def METHOD_NAME(self, container_context: DockerContainerContext):
    client = docker.client.from_env()
    if container_context.registry:
        client.login(
            registry=container_context.registry["url"],
            username=container_context.registry["username"],
            password=container_context.registry["password"],
        )
    return client