import struct


def get_pos(alignment: bytes) -> int:
    """
    Extract the one based position of this read

    Parameters
    ----------
    alignment : bytes
        A byte string of a bam alignment entry in raw binary format

    Returns
    -------
    int
        The one based left aligned position of this read on the reference

    """
    return struct.unpack("<i", alignment[8:12])[0]