# Path: penman/types.py



from typing import Dict, List, Tuple, Set, Mapping, Any, Iterator
from penman.types import (Variable, Branch, Node)
    Otherwise the prefix is ``'_'``.

    Examples:
        >>> _default_variable_prefix('Alphabet')
        'a'
        >>> _default_variable_prefix('chase-01')
        'c'
        >>> _default_variable_prefix('"string"')
        's'
        >>> _default_variable_prefix('_predicate_n_1"')
        'p'
        >>> _default_variable_prefix(1)
        '_'
        >>> _default_variable_prefix(None)
        '_'
        >>> _default_variable_prefix('')
        '_'
    """
    prefix = '_'
    if concept and isinstance(concept, str):
        for c in concept:
            if c.isalpha():
                prefix = c.lower()
                break
    return prefix


def _map_vars(node, varmap):
    var, branches = node


# Path: penman/types.py



# Path: penman/tree.py
from typing import Dict, List, Tuple, Set, Mapping, Any, Iterator
from penman.types import (Variable, Branch, Node)

    Otherwise the prefix is ``'_'``.

    Examples:
        >>> _default_variable_prefix('Alphabet')
        'a'
        >>> _default_variable_prefix('chase-01')
        'c'
        >>> _default_variable_prefix('"string"')
        's'
        >>> _default_variable_prefix('_predicate_n_1"')
        'p'
        >>> _default_variable_prefix(1)
        '_'
        >>> _default_variable_prefix(None)
        '_'
        >>> _default_variable_prefix('')
        '_'
    """
    prefix = '_'
    if concept and isinstance(concept, str):
        for c in concept:
            if c.isalpha():
                prefix = c.lower()
                break
    return prefix


def _map_vars(node, varmap):
    var, branches = node


    newbranches: List[Branch] = []