# Path: penman/layout.py
# class LayoutMarker(Epidatum):
# class Push(LayoutMarker):
# class Pop(LayoutMarker):
#     def __init__(self, variable):
#     def __repr__(self):
#     def __repr__(self):
# def interpret(t: Tree, model: Model = None) -> Graph:
# def _interpret_node(t: Node, variables: Set[Variable], model: Model):
# def _process_role(role):
# def _process_atomic(target):
# def configure(g: Graph,
#               top: Variable = None,
#               model: Model = None) -> Tree:
# def _configure(g, top, model):
# def _preconfigure(g, model):
# def _configure_node(var, data, nodemap, model):
# def _find_next(data, nodemap):
# def _get_or_establish_site(var, nodemap):
# def _process_epigraph(node):
# def reconfigure(g: Graph,
#                 top: Variable = None,
#                 model: Model = None,
#                 key: Callable[[Role], Any] = None) -> Tree:
#         def _key(triple):
# def rearrange(t: Tree,
#               key: Callable[[Role], Any] = None,
#               attributes_first: bool = False) -> None:
#     def sort_key(branch: Branch):
# def _rearrange(node: Node, key: Callable[[Branch], Any]) -> None:
# def get_pushed_variable(g: Graph,
#                         triple: BasicTriple) -> Union[Variable, None]:
# def appears_inverted(g: Graph, triple: BasicTriple) -> bool:
# def node_contexts(g: Graph) -> List[Union[Variable, None]]:
# POP = Pop()
# 
# Path: penman/surface.py
# T = TypeVar('T', bound='AlignmentMarker')  # for classmethods
# class AlignmentMarker(Epidatum):
# class Alignment(AlignmentMarker):
# class RoleAlignment(AlignmentMarker):
#     def __init__(self, indices: Tuple[int, ...], prefix: str = None):
#     def from_string(cls: Type[T], s: str) -> T:
#     def __repr__(self):
#     def __str__(self):
#     def __eq__(self, other):
# def alignments(g: Graph) -> _Alignments:
# def role_alignments(g: Graph) -> _Alignments:
# def _get_alignments(g: Graph,
#                     alignment_type: Type[AlignmentMarker]) -> _Alignments:


import logging
import pytest
import penman
from penman import layout
from penman import surface
        assert g.triples == [
            ('one', ':instance', '"a string"')
        ]

        # numeric symbol (from https://github.com/goodmami/penman/issues/17)
        g = decode('(g / go :null_edge (x20 / 876-9))')
        assert g.triples == [
            ('g', ':instance', 'go'),
            ('g', ':null_edge', 'x20'),
            ('x20', ':instance', '876-9'),
        ]

    def test_decode_alignments(self):
        g = decode('(a / alpha~1)')
        assert g.triples == [
            ('a', ':instance', 'alpha'),
        ]
        assert surface.alignments(g) == {
            ('a', ':instance', 'alpha'): surface.Alignment((1,)),
        }
        assert surface.role_alignments(g) == {}

        assert decode('(a / alpha~1)') == decode('(a / alpha ~1)')

        g = decode('(a :ARG~e.1,2 b)')
        assert g.triples == [
            ('a', ':instance', None),
            ('a', ':ARG', 'b'),
        ]
        assert surface.alignments(g) == {}

# Path: penman/layout.py
# class LayoutMarker(Epidatum):
# class Push(LayoutMarker):
# class Pop(LayoutMarker):
#     def __init__(self, variable):
#     def __repr__(self):
#     def __repr__(self):
# def interpret(t: Tree, model: Model = None) -> Graph:
# def _interpret_node(t: Node, variables: Set[Variable], model: Model):
# def _process_role(role):
# def _process_atomic(target):
# def configure(g: Graph,
#               top: Variable = None,
#               model: Model = None) -> Tree:
# def _configure(g, top, model):
# def _preconfigure(g, model):
# def _configure_node(var, data, nodemap, model):
# def _find_next(data, nodemap):
# def _get_or_establish_site(var, nodemap):
# def _process_epigraph(node):
# def reconfigure(g: Graph,
#                 top: Variable = None,
#                 model: Model = None,
#                 key: Callable[[Role], Any] = None) -> Tree:
#         def _key(triple):
# def rearrange(t: Tree,
#               key: Callable[[Role], Any] = None,
#               attributes_first: bool = False) -> None:
#     def sort_key(branch: Branch):
# def _rearrange(node: Node, key: Callable[[Branch], Any]) -> None:
# def get_pushed_variable(g: Graph,
#                         triple: BasicTriple) -> Union[Variable, None]:
# def appears_inverted(g: Graph, triple: BasicTriple) -> bool:
# def node_contexts(g: Graph) -> List[Union[Variable, None]]:
# POP = Pop()
# 
# Path: penman/surface.py
# T = TypeVar('T', bound='AlignmentMarker')  # for classmethods
# class AlignmentMarker(Epidatum):
# class Alignment(AlignmentMarker):
# class RoleAlignment(AlignmentMarker):
#     def __init__(self, indices: Tuple[int, ...], prefix: str = None):
#     def from_string(cls: Type[T], s: str) -> T:
#     def __repr__(self):
#     def __str__(self):
#     def __eq__(self, other):
# def alignments(g: Graph) -> _Alignments:
# def role_alignments(g: Graph) -> _Alignments:
# def _get_alignments(g: Graph,
#                     alignment_type: Type[AlignmentMarker]) -> _Alignments:


# Path: tests/test_codec.py
import logging
import pytest
import penman
from penman import layout
from penman import surface

        assert g.triples == [
            ('one', ':instance', '"a string"')
        ]

        # numeric symbol (from https://github.com/goodmami/penman/issues/17)
        g = decode('(g / go :null_edge (x20 / 876-9))')
        assert g.triples == [
            ('g', ':instance', 'go'),
            ('g', ':null_edge', 'x20'),
            ('x20', ':instance', '876-9'),
        ]

    def test_decode_alignments(self):
        g = decode('(a / alpha~1)')
        assert g.triples == [
            ('a', ':instance', 'alpha'),
        ]
        assert surface.alignments(g) == {
            ('a', ':instance', 'alpha'): surface.Alignment((1,)),
        }
        assert surface.role_alignments(g) == {}

        assert decode('(a / alpha~1)') == decode('(a / alpha ~1)')

        g = decode('(a :ARG~e.1,2 b)')
        assert g.triples == [
            ('a', ':instance', None),
            ('a', ':ARG', 'b'),
        ]
        assert surface.alignments(g) == {}

        assert surface.role_alignments(g) == {