code: def type(self, type):
          # pylint: disable=redefined-builtin
          
  
          type = _ensure_unicode(type)
  
          # We perform this check after the initialization to avoid errors
          # in test tools that show the object with repr().
          if type not in ALL_CIMTYPES:
              raise ValueError(
                  _format("Invalid CIM type: {0}", type))
  
          # pylint: disable=attribute-defined-outside-init
          self._type = type
docs: Setter method; for a description see the getter method.