<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def image_needs_pushing(image):
 """Return whether an image needs pushing Args: image (str):
 the `repository:tag` image to be build. Returns: True: if image needs to be pushed (not on registry) False: if not (already present on registry) """

    d = docker_client()
    try:
        d.images.get_registry_data(image)
    except docker.errors.APIError:
        # image not found on registry, needs pushing
        return True
    else:
        return False