code: def instance_of(klass, arg):
      
      if not isinstance(arg, klass):
          raise com.IbisTypeError(
              'Given argument with type {} is not an instance of {}'.format(
                  type(arg), klass
              )
          )
      return arg
docs: Require that a value has a particular Python type.