def _parse_mapping_config(config: str):
    """Parse config such as: numpy -> asnumpy, reshape, ...
    Return a list of string pairs
    """
    mapping = []
    for line in config.splitlines():
        for term in line.split(','):
            term = term.strip()
            if not term:
                continue
            if len(term.split('->')) == 2:
                a, b = term.split('->')
                mapping.append((a.strip(), b.strip()))
            else:
                mapping.append((term, term))
    return mapping