def METHOD_NAME(self, node):
    if isinstance(node, py_ast.List):
        elements = []
        for node2 in node.elts:
            elements.append(self.METHOD_NAME(node2))
        return elements
    if isinstance(node, py_ast.Dict):
        keys = []
        for node2 in node.keys:
            if isinstance(node2, py_ast.Constant):
                value = node2.value
            elif isinstance(node2, py_ast.Str):  # py37
                value = node2.s
            else:
                raise NotImplementedError(f'Unknown dict key {node2}')
            keys.append(value)
        values = []
        for node2 in node.values:
            values.append(self.METHOD_NAME(node2))
        return dict(zip(keys, values))
    if isinstance(node, py_ast.Name):
        # special attributes
        name = node.id
        if name == 'true':
            return True
        elif name == 'false':
            return False
        elif name == 'null':
            return None
    if isinstance(node, py_ast.Constant):
        return node.value
    # ---- python 3.7 objects -----
    if isinstance(node, py_ast.Str):
        return node.s
    if isinstance(node, py_ast.Num):
        return node.n
    # -----------------------------
    if isinstance(node, py_ast.UnaryOp):
        if isinstance(node.op, py_ast.USub):
            value = self.METHOD_NAME(node.operand)
            return -value
    raise NotImplementedError(f'Unknown node {node}')