docs: def assertType(var, *allowedTypes):
      """
      Asserts that a variable @var is of an @expectedType. Raises a TypeError
      if the assertion fails.
      """
      if not isinstance(var, *allowedTypes):
          raise NotImplementedError("This operation is only supported for {}. "\
              "Instead found {}".format(str(*allowedTypes), type(var)))