# Path: robograph/datamodel/nodes/lib/functional_operators.py
# class Mapper(node.Node):
# class Reducer(node.Node):
# class Filter(node.Node):
# class Sorter(node.Node):
# class ReverseSorter(Sorter):
# class Uniquer(node.Node):
#     def output(self):
#     def output(self):
#     def output(self):
#     def output(self):
#     def output(self):
#     def output(self):


from robograph.datamodel.nodes.lib import functional_operators as fo


def sorting_function(x, y):
    if x['a'] > y['a']:
        return 1
    elif x['a'] < y['a']:
        return -1
    else:
        return 0


def reverse_sorting_function(x, y):
    if x['a'] > y['a']:
        return -1
    elif x['a'] < y['a']:
        return 1
    else:
        return 0


def test_mapper():
    seq = [1, 2, 3, 4]
    expected_seq = [1, 4, 9, 16]
    expected_reqs = ['mapping_function', 'sequence']

# Path: robograph/datamodel/nodes/lib/functional_operators.py
# class Mapper(node.Node):
# class Reducer(node.Node):
# class Filter(node.Node):
# class Sorter(node.Node):
# class ReverseSorter(Sorter):
# class Uniquer(node.Node):
#     def output(self):
#     def output(self):
#     def output(self):
#     def output(self):
#     def output(self):
#     def output(self):


# Path: robograph/datamodel/tests/test_functional_operators.py
from robograph.datamodel.nodes.lib import functional_operators as fo



def sorting_function(x, y):
    if x['a'] > y['a']:
        return 1
    elif x['a'] < y['a']:
        return -1
    else:
        return 0


def reverse_sorting_function(x, y):
    if x['a'] > y['a']:
        return -1
    elif x['a'] < y['a']:
        return 1
    else:
        return 0


def test_mapper():
    seq = [1, 2, 3, 4]
    expected_seq = [1, 4, 9, 16]
    expected_reqs = ['mapping_function', 'sequence']

    instance = fo.Mapper()