code: def _iparam_namespace_from_objectname(self, objectname, arg_name):
          # pylint: disable=invalid-name,
          
  
          if isinstance(objectname, (CIMClassName, CIMInstanceName)):
              namespace = objectname.namespace
          elif isinstance(objectname, six.string_types):
              namespace = None
          elif objectname is None:
              namespace = objectname
          else:
              raise TypeError(
                  _format("The {0!A} argument of the WBEMConnection operation "
                          "has invalid type {1} (must be None, a string, a "
                          "CIMClassName, or a CIMInstanceName)",
                          arg_name, type(objectname)))
          if namespace is None:
              namespace = self.default_namespace
          return namespace
docs: Determine the namespace from an object name, that can be a class
          name string, a CIMClassName or CIMInstanceName object, or `None`.
          The default namespace of the connection object is used, if needed.
  
          Return the so determined namespace for use as an argument to
          imethodcall().