def METHOD_NAME(from_path: str, to_path: Optional[str] = None, compression: Optional[str] = None) -> None:
    """Extract tar format file."""
    with tarfile.open(from_path, f"r:{compression[1:]}" if compression else "r") as tar:
        tar.extractall(to_path)