<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_tarfile(files: List[str], tar_path: str) -> None: """Create a tar file based on the list of files passed"""

    with tarfile.open(tar_path, "w:gz") as tar:
        for f in files:
            tar.add(f)