code: def _islots(self):
          
          if "__slots__" not in self.locals:
              return None
          for slots in self.igetattr("__slots__"):
              # check if __slots__ is a valid type
              for meth in ITER_METHODS:
                  try:
                      slots.getattr(meth)
                      break
                  except exceptions.AttributeInferenceError:
                      continue
              else:
                  continue
  
              if isinstance(slots, node_classes.Const):
                  # a string. Ignore the following checks,
                  # but yield the node, only if it has a value
                  if slots.value:
                      yield slots
                  continue
              if not hasattr(slots, "itered"):
                  # we can't obtain the values, maybe a .deque?
                  continue
  
              if isinstance(slots, node_classes.Dict):
                  values = [item[0] for item in slots.items]
              else:
                  values = slots.itered()
              if values is util.Uninferable:
                  continue
              if not values:
                  # Stop the iteration, because the class
                  # has an empty list of slots.
                  return values
  
              for elt in values:
                  try:
                      for inferred in elt.infer():
                          if inferred is util.Uninferable:
                              continue
                          if not isinstance(
                              inferred, node_classes.Const
                          ) or not isinstance(inferred.value, str):
                              continue
                          if not inferred.value:
                              continue
                          yield inferred
                  except exceptions.InferenceError:
                      continue
  
          return None
docs: Return an iterator with the inferred slots.