human
I wrote the below code

    if isinstance(node_or_string, str):
        node_or_string = parse(node_or_string, mode='eval')
    if isinstance(node_or_string, Expression):
        node_or_string = node_or_string.body
    def _convert(node):
        if isinstance(node, Constant):
            return node.value
        elif isinstance(node, (Str, Bytes)):
            return node.s
        elif isinstance(node, Num):
            return node.n
        elif isinstance(node, Tuple):
            return tuple(map(_convert, node.elts))
        elif isinstance(node, List):
            return list(map(_convert, node.elts))
        elif isinstance(node, Set):
            return set(map(_convert, node.elts))
        elif isinstance(node, Dict):
            return dict(((_convert(k), _convert(v)) for (k, v) in zip(node.keys, node.values)))
        elif isinstance(node, NameConstant):
            return node.value
        elif (isinstance(node, UnaryOp) and isinstance(node.op, (UAdd, USub))):
            operand = _convert(node.operand)
            if isinstance(operand, _NUM_TYPES):
                if isinstance(node.op, UAdd):
                    return (+ operand)
                else:
                    return (- operand)
        elif (isinstance(node, BinOp) and isinstance(node.op, (Add, Sub))):
            left = _convert(node.left)
            right = _convert(node.right)
            if (isinstance(left, _NUM_TYPES) and isinstance(right, _NUM_TYPES)):
                if isinstance(node.op, Add):
                    return (left + right)
                else:
                    return (left - right)
        raise ValueError(('malformed    node    or    string:    ' + repr(node)))
    return _convert(node_or_string)

What's a good function header?

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

def literal_eval(node_or_string):