code: def _fake_enumerateinstances(self, namespace, **params):
          
  
          # Validate namespace
          instance_repo = self._get_instance_repo(namespace)
  
          cname = params['ClassName']
          assert isinstance(cname, CIMClassName)
          cname = cname.classname
  
          # If di False we use only properties from the original class. Modify
          # property list to limit properties to those from this class.  This
          # only works if class exists.
          # if class not in repository, ignore di.
          di = params['DeepInheritance']
  
          # If None, set to server default
          if di is None:
              di = DEFAULT_DEEP_INHERITANCE
  
          pl = params['PropertyList']
          lo = params['LocalOnly']
  
          if not self._repo_lite:
              # gets class propertylist which is may be localonly or all
              # superclasses
              cl = self._get_class(cname, namespace, local_only=lo)
              class_pl = cl.properties.keys()
          else:
              class_pl = None
  
          # if not lite repo and not di compute property list to filter
          # all instances to the properties in the target class as modified
          # by the PropertyList
          if not self._repo_lite:
              if not di:
                  if pl is None:
                      pl = class_pl
                  else:      # reduce pl to properties in class_properties
                      pl = [pc for pc in class_pl if pc in pl]
  
          clns_dict = self._get_subclass_list_for_enums(cname, namespace)
          insts = [self._get_instance(inst.path, namespace,
                                      pl,
                                      None,  # LocalOnly never gets passed
                                      params['IncludeClassOrigin'],
                                      params['IncludeQualifiers'])
                   for inst in instance_repo if inst.path.classname in clns_dict]
  
          return self._make_tuple(insts)
docs: Implements a server responder for
          :meth:`~pywbem.WBEMConnection.EnumerateInstances`.
  
          Gets a list of subclasses if the classes exist in the repository
          then executes getInstance for each to create the list of instances
          to be returned.
  
          Raises:
  
              CIMError: CIM_ERR_INVALID_NAMESPACE