code: def get_rules_import_paths():
      
      # Bundled rules:
      yield Path(__file__).parent.joinpath('rules')
      # Rules defined by user:
      yield settings.user_dir.joinpath('rules')
      # Packages with third-party rules:
      for path in sys.path:
          for contrib_module in Path(path).glob('thefuck_contrib_*'):
              contrib_rules = contrib_module.joinpath('rules')
              if contrib_rules.is_dir():
                  yield contrib_rules
docs: Yields all rules import paths.
  
      :rtype: Iterable[Path]