def get_chars(in_bytes, trim_nulls=True):
    """
    Convert zero-padded GT text field into string

    :param in_bytes: gt text field in bytes
    :type in_bytes: bytes
    :param trim_nulls: if true, trim off the zero-padding, defaults to True
    :type trim_nulls: bool, optional
    :return: String conversion
    :rtype: str
    """
    result = in_bytes.decode('Latin-1')
    if trim_nulls:
        result = result.strip('\0')  # no interpretation, preserve encoding
    return result