code: async def pull(
          self,
          from_image: str,
          *,
          auth: Optional[Union[MutableMapping, str, bytes]] = None,
          tag: str = None,
          repo: str = None,
          stream: bool = False
      ) -> Mapping:
          
          image = from_image  # TODO: clean up
          params = {"fromImage": image}
          headers = {}
          if repo:
              params["repo"] = repo
          if tag:
              params["tag"] = tag
          if auth is not None:
              registry, has_registry_host, _ = image.partition("/")
              if not has_registry_host:
                  raise ValueError(
                      "Image should have registry host "
                      "when auth information is provided"
                  )
              # TODO: assert registry == repo?
              headers["X-Registry-Auth"] = compose_auth_header(auth, registry)
          response = await self.docker._query(
              "images/create", "POST", params=params, headers=headers
          )
          return await json_stream_result(response, stream=stream)
docs: Similar to `docker pull`, pull an image locally
  
          Args:
              fromImage: name of the image to pull
              repo: repository name given to an image when it is imported
              tag: if empty when pulling an image all tags
                   for the given image to be pulled
              auth: special {'auth': base64} pull private repo