pylas/vlrs/known.py
def vlr_factory(raw_vlr):
    """ Given a raw_vlr tries to find its corresponding KnownVLR class
    that can parse its data.
    If no KnownVLR implementation is found, returns a VLR (record_data will still be bytes)
    """
    user_id = raw_vlr.header.user_id.rstrip(NULL_BYTE).decode()
    known_vlrs = BaseKnownVLR.__subclasses__()
    for known_vlr in known_vlrs:
        if (
            known_vlr.official_user_id() == user_id
            and raw_vlr.header.record_id in known_vlr.official_record_ids()
        ):
            return known_vlr.from_raw(raw_vlr)
    else:
        return VLR.from_raw(raw_vlr)
def vlr_factory(raw_vlr):
    """ Given a raw_vlr tries to find its corresponding KnownVLR class
    that can parse its data.
    If no KnownVLR implementation is found, returns a VLR (record_data will still be bytes)
    """
    user_id = raw_vlr.header.user_id.rstrip(NULL_BYTE).decode()
    known_vlrs = BaseKnownVLR.__subclasses__()
    for known_vlr in known_vlrs:
        if (
            known_vlr.official_user_id() == user_id
            and raw_vlr.header.record_id in known_vlr.official_record_ids()
        ):
            return known_vlr.from_raw(raw_vlr)
    else:
        return VLR.from_raw(raw_vlr)
Given a raw_vlr tries to find its corresponding KnownVLR class
    that can parse its data.
    If no KnownVLR implementation is found, returns a VLR (record_data will still be bytes)