code: def max_rigid_id(self):
          
          try:
              return max([particle.rigid_id for particle in self.particles()
                          if particle.rigid_id is not None])
          except ValueError:
              return
docs: Returns the maximum rigid body ID contained in the Compound.
  
          This is usually used by compound.root to determine the maximum
          rigid_id in the containment hierarchy.
  
          Returns
          -------
          int or None
              The maximum rigid body ID contained in the Compound. If no
              rigid body IDs are found, None is returned