# Path: pycc/asttools/parse.py
# def parse(source, filename='<unknown>', mode='exec'):
#     """An ast.parse extension.
# 
#     This function behaves identically to the standard ast.parse except that it
#     adds parent and sibling references to each node.
#     """
#     node = ast.parse(source, filename, mode)
#     references.add_parent_references(node)
#     references.add_sibling_references(node)
# 
#     return node
# 
# Path: pycc/astwrappers/name.py
# class NameGenerator(visitortools.NodeVisitorIter, nametools.NameVisitorMixin):
# class Name(object):
#     def visit(self):
#     def __init__(self, node):
#     def node(self):
#     def declaration(self):
#     def source(self):
#     def token(self):
#     def uses(self):
#     def assignments(self):
#     def constant(self):
#     def __repr__(self):
#     def __lt__(self, other):
#     def __gt__(self, other):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __le__(self, other):
#     def __ge__(self, other):
#     def __hash__(self):


import functools
import pytest
from pycc.asttools import parse
from pycc.astwrappers import name

def use_reference():
    print(assign_once)
    return reference_somewhere

read_with_global = 321

def read_global():
    global read_with_global
    return read_with_global

write_with_global = 98

def write_global():
    global write_with_global
    write_with_global = 89

from fake_module import imported_name

def function_name():
    pass

class ClassName(object):
    pass
"""


@pytest.fixture
def node():
    """Get as AST node from the source."""

# Path: pycc/asttools/parse.py
# def parse(source, filename='<unknown>', mode='exec'):
#     """An ast.parse extension.
# 
#     This function behaves identically to the standard ast.parse except that it
#     adds parent and sibling references to each node.
#     """
#     node = ast.parse(source, filename, mode)
#     references.add_parent_references(node)
#     references.add_sibling_references(node)
# 
#     return node
# 
# Path: pycc/astwrappers/name.py
# class NameGenerator(visitortools.NodeVisitorIter, nametools.NameVisitorMixin):
# class Name(object):
#     def visit(self):
#     def __init__(self, node):
#     def node(self):
#     def declaration(self):
#     def source(self):
#     def token(self):
#     def uses(self):
#     def assignments(self):
#     def constant(self):
#     def __repr__(self):
#     def __lt__(self, other):
#     def __gt__(self, other):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __le__(self, other):
#     def __ge__(self, other):
#     def __hash__(self):


# Path: tests/astwrappers/test_name_wrapper.py
import functools
import pytest
from pycc.asttools import parse
from pycc.astwrappers import name


def use_reference():
    print(assign_once)
    return reference_somewhere

read_with_global = 321

def read_global():
    global read_with_global
    return read_with_global

write_with_global = 98

def write_global():
    global write_with_global
    write_with_global = 89

from fake_module import imported_name

def function_name():
    pass

class ClassName(object):
    pass
"""


@pytest.fixture
def node():
    """Get as AST node from the source."""

    return parse.parse(source)