def registry_from_image(image_name):
if '<STR_LIT:/>' not in image_name: <EOL><INDENT>return constants.PUBLIC_DOCKER_REGISTRY<EOL><DEDENT>prefix = image_name.split('<STR_LIT:/>')[<NUM_LIT:0>]<EOL>if '<STR_LIT:.>' not in prefix: <EOL><INDENT>return constants.PUBLIC_DOCKER_REGISTRY<EOL><DEDENT>return prefix<EOL>
Returns the Docker registry host associated with
    a given image name.