Given a chromosome and position, returns all matching records from the chain index.
        Each record is an interval (source_from, source_to, data)
        where data = (target_from, target_to, chain). Note that depending on chain.target_strand, the target values may need to be reversed (e.g. pos --> chain.target_size - pos).
        
        If chromosome is not found in the index, None is returned.

def query(self, chromosome, position):
        '''
        Given a chromosome and position, returns all matching records from the chain index.
        Each record is an interval (source_from, source_to, data)
        where data = (target_from, target_to, chain). Note that depending on chain.target_strand, the target values may need to be reversed (e.g. pos --> chain.target_size - pos).
        
        If chromosome is not found in the index, None is returned.
        '''
        # A somewhat-ugly hack to allow both 'bytes' and 'str' objects to be used as
        # chromosome names in Python 3. As we store chromosome names as strings,
        # we'll transparently translate the query to a string too.
        if type(chromosome).__name__ == 'bytes':
            chromosome = chromosome.decode('ascii')
        if chromosome not in self.chain_index:
            return None
        else:
            return self.chain_index[chromosome].query(position)