def METHOD_NAME(image_name: str, tar: TarFile, tar_location: str):
    tar_dir = os.path.dirname(tar_location)
    # grab all files in the folder and only take the one that's named with hex values and a json extension
    members = tar.getmembers()
    info_file_name = [
        file
        for file in members
        if file.name.endswith(".json") and not file.name.startswith("manifest")
    ]
    info_file = None
    # if there's more than one image in the tarball, we need to do some more logic
    if len(info_file_name) > 0:
        # extract just the manifest file and see if any of the RepoTags match the image_name we're searching for
        # the manifest.json should have a list of all the image tags
        # and what json files they map to to get env vars, startup cmd, etc.
        tar.extract("manifest.json", path=tar_dir)
        manifest_path = os.path.join(tar_dir, "manifest.json")
        manifest = load_json_from_file(manifest_path)
        # if we match a RepoTag to the image, stop searching
        for image in manifest:
            if image_name in image.get("RepoTags"):
                info_file = [
                    item for item in info_file_name if item.name == image.get("Config")
                ][0]
                break
        # remove the extracted manifest file to clean up
        os.remove(manifest_path)
    else:
        eprint(f"Tarball at {tar_location} contains no images")
    if not info_file:
        return None
    tar.extract(info_file.name, path=tar_dir)
    # get the path of the json file and read it in
    image_info_file_path = os.path.join(tar_dir, info_file.name)
    image_info_raw = load_json_from_file(image_info_file_path)
    # delete the extracted json file to clean up
    os.remove(image_info_file_path)
    image_info = image_info_raw.get("config")
    # importing the constant from config.py gives a circular dependency error
    image_info["Architecture"] = image_info_raw.get("architecture")
    return image_info