code: def particles(self, include_ports=False):
          
          if not self.children:
              yield self
          else:
              for particle in self._particles(include_ports):
                  yield particle
docs: Return all Particles of the Compound.
  
          Parameters
          ----------
          include_ports : bool, optional, default=False
              Include port particles
  
          Yields
          -------
          mb.Compound
              The next Particle in the Compound