code: def find_geometry(self, physics):
          r
          # If geometry happens to be in settings, look it up directly
          if 'geometry' in physics.settings.keys():
              geom = self.geometries()[physics.settings['geometry']]
              return geom
          # Otherwise, use the bottom-up approach
          for geo in self.geometries().values():
              if physics in self.find_physics(geometry=geo):
                  return geo
          # If all else fails, throw an exception
          raise Exception('Cannot find a geometry associated with '+physics.name)
docs: r"""
          Find the Geometry associated with a given Physics
  
          Parameters
          ----------
          physics : OpenPNM Physics Object
              Must be a Physics object
  
          Returns
          -------
          An OpenPNM Geometry object
  
          Raises
          ------
          If no Geometry object can be found, then an Exception is raised.