def parse_call(line):
    """
    Parses lines of the following form

        Line #|      Hits|         Time| Time per hit|      %|Source code
        ------+----------+-------------+-------------+-------+-----------
        (call)|      2528|     0.352177|   0.00013931|  0.01%|# to_html.py:74 get_html_filename

    Extracts a dict of (hits, time, time_per_hit, percentage, file_name, line_number, entry_point)

    :param line: string
    :return: tuple
    """
    columns = line.split('|')
    first, sep, second = columns[5].rpartition(':')
    line_number, sep, entry_point = second.partition(' ')
    file_name = first.strip('# ')
    return {'hits': int(columns[1]), 'time': float(columns[2]),
        'time_per_hit': float(columns[3]), 'percentage': float(columns[4][:
        -1]), 'file_name': file_name, 'line_number': int(line_number),
        'entry_point': entry_point}
