import re


def instructor_order(arg):
  """  Name (role)
       Return a string that orders the role PI->Si->TA->other, followed by the name.
  """
  role = 9  # No role or role not in {PI, SI, TA}
  matches = re.match(r'.*?\((.*)\)', arg)
  if matches:
    try:
      role = ['PI', 'SI', 'TA'].index(matches.group(1))
    except ValueError:
      pass
  return f'{role}{arg}'