input: Write a python function to parse a string containing a function or class definition and return a tuple containing information about the function.
  assert tokenFromString("#def foo(bar):").name == "foo"
  assert tokenFromString("#def foo(bar):").type == "def"
  assert tokenFromString("#def foo(bar):").params == "(bar)"
  assert tokenFromString("class MyClass:").name == "MyClass"
  assert tokenFromString("class MyClass:").type == "class"
output: def tokenFromString(s):
      import re
      if s.startswith("#def"):
          match = re.match(r"#def (\w+)\(([^)]*)\):", s)
          if match:
              name, params = match.groups()
              return Token(name=name, type="def", params=f"({params})")
      elif s.startswith("class"):
          match = re.match(r"class (\w+):", s)
          if match:
              name = match.group(1)
              return Token(name=name, type="class", params=None)
      return None
  
  class Token:
      def __init__(self, name, type, params):
          self.name = name
          self.type = type
          self.params = params