def METHOD_NAME():
    if not any(r for r in records if r.size is None):  # All records already have a size
        return {}, {}
    lfs_files_sizes = {}
    try:
        lfs_run = run(
            ("git", "lfs", "ls-files", "--name-only", "--size", "--deleted"),
            stdout=PIPE,
            cwd=project_context.path,
            text=True,
        )
    except SubprocessError:
        pass
    else:
        lfs_output = lfs_run.stdout.split("\n")
        # Example line format: relative/path/to/file (7.9 MB)
        pattern = re.compile(r"^(.*?)\s*\((.*)\)")
        for line in lfs_output:
            match = pattern.search(line)
            if not match:
                continue
            path, size = match.groups()
            # Fix alignment for bytes
            if size.endswith(" B"):
                size = size.replace(" B", "  B")
            lfs_files_sizes[path] = size
    non_lfs_files_sizes: Dict[str, Optional[Union[int, str]]]
    if has_tag:
        checksums = [r.entity.checksum for r in records]
        sizes = repository.get_sizes(*checksums)
        non_lfs_files_sizes = {k.entity.path: naturalize(v) for k, v in zip(records, sizes)}
    else:
        non_lfs_files_sizes = {
            o.path: o.size for o in repository.head.commit.traverse() if o.path not in lfs_files_sizes
        }
        non_lfs_files_sizes = {k: naturalize(v) for k, v in non_lfs_files_sizes.items()}
    return lfs_files_sizes, non_lfs_files_sizes