import re


def get_chiral_indices_from_str(Ch):
    """Return the chiral indicies `n` and `m`.

    Parameters
    ----------
    Ch : str
        string of the form 'NNMM' or "(n, m)". Extra spaces are acceptable.

    Returns
    -------
    sequence
        2-tuple of chiral indices `n` and `m`

    """
    try:
        return int(Ch[:2]), int(Ch[2:])
    except ValueError:
        try:
            return tuple([int(c) for c in re.split('[\(\),\s*]+', Ch)[1:-1]])
        except Exception as e:
            print(e)
            return None