def _get_var_node_source_info(var_node):
    """ returns the line number, part and filename
        for a given variable node.
    """
    source = var_node.source[0]
    string_range = var_node.source[1]
    filename = getattr(source, 'name', None)
    line_no = None
    part = None
    if hasattr(source, 'loader'):
        origin = source.loader(source.loadname)[0]
        line_no = 1 + origin[:string_range[0]].count('\n')
        part = origin[string_range[0]:string_range[1]]
    return line_no, part, filename
