code: def define(cls, name, **kwargs):
          
          params = {'name': param.String(default=name)}
          for k, v in kwargs.items():
              kws = dict(default=v, constant=True)
              if isinstance(v, param.Parameter):
                  params[k] = v
              elif isinstance(v, bool):
                  params[k] = param.Boolean(**kws)
              elif isinstance(v, int):
                  params[k] = param.Integer(**kws)
              elif isinstance(v, float):
                  params[k] = param.Number(**kws)
              elif isinstance(v, str):
                  params[k] = param.String(**kws)
              elif isinstance(v, dict):
                  params[k] = param.Dict(**kws)
              elif isinstance(v, tuple):
                  params[k] = param.Tuple(**kws)
              elif isinstance(v, list):
                  params[k] = param.List(**kws)
              elif isinstance(v, np.ndarray):
                  params[k] = param.Array(**kws)
              else:
                  params[k] = param.Parameter(**kws)
  
          # Dynamic class creation using type
          return type(name, (Stream,), params)
docs: Utility to quickly and easily declare Stream classes. Designed
          for interactive use such as notebooks and shouldn't replace
          parameterized class definitions in source code that is imported.
  
          Takes a stream class name and a set of keywords where each
          keyword becomes a parameter. If the value is already a
          parameter, it is simply used otherwise the appropriate parameter
          type is inferred and declared, using the value as the default.
  
          Supported types: bool, int, float, str, dict, tuple and list