def METHOD_NAME(cursor, name):
  res = ""
  tokens = [j.spelling for j  in cursor.get_tokens()]
  type_tokens = []
  for t in tokens:
    if t == name:
      break
    type_tokens.append(t)
  return " ".join(type_tokens)