code: def _cim_method(key, value):
      
  
      if key is None:
          raise ValueError("Method name must not be None")
  
      try:
          assert isinstance(value, CIMMethod)
      except AssertionError:
          raise TypeError(
              _format("Method must be a CIMMethod object, but is: {0}",
                      type(value)))
  
      if value.name.lower() != key.lower():
          raise ValueError(
              _format("CIMMethod.name must be dictionary key {0!A}, but is ",
                      "{1!A}", key, value.name))
  
      return value
docs: Return a CIMMethod object, from dict item input (key+value), after
      performing some checks.
  
      The input value must be a CIMMethod object, which is returned.