def METHOD_NAME(source_path: str, target_file: str, compression: bool = False) -> _TarResults:
    """Create tar from directory using `tar`
    Parameters
    ----------
    source_path: str
        Source directory or file
    target_file
        Target tar file
    compression: bool, default False
        Enable compression, which is disabled by default.
    Returns
    -------
    TarResults
        Results that holds file counts and sizes
    """
    if os.path.isdir(source_path):
        before_size, _ = _get_dir_size_and_count(source_path)
    else:
        before_size = os.path.getsize(source_path)
    try:
        _tar_path_subprocess(source_path, target_file, compression)
    except subprocess.CalledProcessError:
        _tar_path_python(source_path, target_file, compression)
    after_size = os.stat(target_file).st_size
    return _TarResults(before_size=before_size, after_size=after_size)