code: def _validate_hatch_pattern(hatch):
      valid_hatch_patterns = set(r"-+|/\xXoO.*")
      if hatch is not None:
          invalids = set(hatch).difference(valid_hatch_patterns)
          if invalids:
              valid = "".join(sorted(valid_hatch_patterns))
              invalids = "".join(sorted(invalids))
              _api.warn_deprecated(
                  "3.4",
                  removal="3.9",  # one release after custom hatches (#20690)
                  message=f'hatch must consist of a string of "{valid}" or '
                  "None, but found the following invalid values "
                  f'"{invalids}". Passing invalid values is deprecated '
                  "since %(since)s and will become an error %(removal)s.",
              )
  
imports: import numpy
  from matplotlib import _api
  from matplotlib.path import Path
label_desc: Use image node_id 1 for calling a global function with example usage: _validate_hatch_pattern(hatch) without return types