Python before 3.8 does not have Literal
import enum
import re
+import sys
from array import array
-from typing import Any, List, Optional, Dict, Tuple, Union, Literal, overload
+from typing import Any, List, Optional, Dict, Tuple, Union, overload
+if sys.version_info < (3, 8):
+ from typing_extensions import Literal
+else:
+ from typing import Literal
from pysam import AlignmentHeader # type: ignore
