code: def validate_hatch(s):
      r"""
      Validate a hatch pattern.
      A hatch pattern string can have any sequence of the following
      characters: ``\ / | - + * . x o O``.
      """
      if not isinstance(s, str):
          raise ValueError("Hatch pattern must be a string")
      _api.check_isinstance(str, hatch_pattern=s)
      unknown = set(s) - {
          "\\",
          "/",
          "|",
          "-",
          "+",
          "*",
          ".",
          "x",
          "o",
          "O",
      }
      if unknown:
          raise ValueError(
              "Unknown hatch symbol(s): %s" % list(unknown)
          )
      return s
  
imports: import ast
  from functools import lru_cache, reduce
  from numbers import Real
  import operator
  import os
  import re
  import numpy
  from matplotlib import _api, cbook
  from matplotlib.cbook import ls_mapper
  from matplotlib.colors import Colormap, is_color_like
  from matplotlib._fontconfig_pattern import parse_fontconfig_pattern
  from matplotlib._enums import JoinStyle, CapStyle
  from cycler import Cycler, cycler
label_desc: Use image node_id 36 for calling a global function with example usage: validate_hatch(s) and returns: s