docs: def _load_rules(forcefield):
      """Load atomtyping rules from a forcefield into SMARTSGraphs. """
      rules = dict()
      for rule_name, smarts in forcefield.atomTypeDefinitions.items():
          overrides = forcefield.atomTypeOverrides.get(rule_name)
          if overrides is not None:
              overrides = set(overrides)
          else:
              overrides = set()
          rules[rule_name] = SMARTSGraph(smarts_string=smarts,
                                         parser=forcefield.parser,
                                         name=rule_name,
                                         overrides=overrides)
      return rules