human
Complete this python program:
def load_tests(dir_comps, file_name, description, conversions):
assistant
#Here is the Python program you requested.

    """Load and parse a test vector file
    This function returnis a list of objects, one per group of adjacent
    KV lines or for a single line in the form "[.*]".
    For a group of lines, the object has one attribute per line.
    """
    file_in = open(pycryptodome_filename(dir_comps, file_name))
    description = ('%s    test    (%s)' % (description, file_name))
    line_number = 0
    results = []
    class TestVector(object, ):
        def __init__(self, description, count):
            self.desc = description
            self.count = count
            self.others = []
    test_vector = None
    count = 0
    new_group = True
    while True:
        line_number += 1
        line = file_in.readline()
        if (not line):
            if (test_vector is not None):
                results.append(test_vector)
            break
        line = line.strip()
        if (line.startswith('#') or (not line)):
            new_group = True
            continue
        if line.startswith('['):
            if (test_vector is not None):
                results.append(test_vector)
            test_vector = None
            results.append(line)
            continue
        if new_group:
            count += 1
            new_group = False
            if (test_vector is not None):
                results.append(test_vector)
            test_vector = TestVector(('%s    (#%d)' % (description, count)), count)
        res = re.match('([A-Za-z0-9]+)    =    ?(.*)', line)
        if (not res):
            test_vector.others += [line]
        else:
            token = res.group(1).lower()
            data = res.group(2).lower()
            conversion = conversions.get(token, None)
            if (conversion is None):
                if ((len(data) % 2) != 0):
                    data = ('0' + data)
                setattr(test_vector, token, unhexlify(data))
            else:
                setattr(test_vector, token, conversion(data))
    return results