'Calculates position of key in buckets file'

def _calculate_key_position(self, start, key_index, flag):

    if (flag == 'l'):
        return ((start + self.leaf_heading_size) + (key_index * self.single_leaf_record_size))
    elif (flag == 'n'):
        return ((start + self.node_heading_size) + (key_index * (self.pointer_size + self.key_size)))
