code: def address_families_for_dir(cls, address_families_dict, spec_dir_path):
      
      maybe_af = address_families_dict.get(spec_dir_path, None)
      if maybe_af is None:
        raise cls.AddressFamilyResolutionError(
          'Path "{}" does not contain any BUILD files.'
          .format(spec_dir_path))
      return [maybe_af]
docs: Implementation of `matching_address_families()` for specs matching at most one directory.