human
I wrote the below code

    def _fix(node, lineno, col_offset):
        if ('lineno' in node._attributes):
            if (not hasattr(node, 'lineno')):
                node.lineno = lineno
            else:
                lineno = node.lineno
        if ('col_offset' in node._attributes):
            if (not hasattr(node, 'col_offset')):
                node.col_offset = col_offset
            else:
                col_offset = node.col_offset
        for child in iter_child_nodes(node):
            _fix(child, lineno, col_offset)
    _fix(node, 1, 0)
    return node

What's a good function header?
assistant
#Here's a good function header.

def fix_missing_locations(node):