def get_references(chebi_ids):
    '''Returns references'''
    references = []
    chebi_ids = [str(chebi_id) for chebi_id in chebi_ids]

    filename = get_file('reference.tsv.gz')

    with io.open(filename, 'r', encoding='cp1252') as textfile:
        next(textfile)

        for line in textfile:
            tokens = line.strip().split('\t')

            if tokens[0] in chebi_ids:
                # Append Reference:
                if len(tokens) > 3:
                    ref = Reference(tokens[1], tokens[2], tokens[3],
                                    tokens[4])
                else:
                    ref = Reference(tokens[1], tokens[2])

                references.append(ref)
    return references