@classmethod
def parse(cls, s: str) -> Identifier:
    'Parse in an identifier from string.'
    if ('(' in s):
        (name_index, params) = s.split('(')
        params = params.split(')')[0]
    else:
        name_index = s
        params = None
    if ('-' in name_index):
        (name, index) = (name_index.split('-')[:(- 1)], name_index.split('-')[(- 1)])
        name = '-'.join(name)
        if index.isnumeric():
            index = int(index)
        else:
            name = '-'.join([name, index])
            index = None
    else:
        name = name_index
        index = None
    if (params is not None):
        params = cls._parse_args(params)
    else:
        params = {}
    return cls(_name=name, _index=index, **params)
Parse in an identifier from string.
@classmethod
def parse(cls, s: str) -> Identifier:
    
    if ('(' in s):
        (name_index, params) = s.split('(')
        params = params.split(')')[0]
    else:
        name_index = s
        params = None
    if ('-' in name_index):
        (name, index) = (name_index.split('-')[:(- 1)], name_index.split('-')[(- 1)])
        name = '-'.join(name)
        if index.isnumeric():
            index = int(index)
        else:
            name = '-'.join([name, index])
            index = None
    else:
        name = name_index
        index = None
    if (params is not None):
        params = cls._parse_args(params)
    else:
        params = {}
    return cls(_name=name, _index=index, **params)