code: def _dispatch(
      self: Any, ctext: str, func: Callable[[str], bytes]
  ) -> Optional[bytes]:
      logging.debug(f"Attempting {self.getTarget()}")
  
      try:
          # remove all whitespace
          ctext = re.sub(r"\s+", "", ctext, re.UNICODE)
          result = func(ctext)
          logging.info(
              f"{self.getTarget()} successful, returning {result}"
          )
          return result
      except ValueError:
          logging.debug(f"Failed to decode {self.getTarget()}")
          return None
  
file_path: Ciphey/ciphey/basemods/Decoders/bases.py
imports: import base64
  import types
  from typing import Any, Callable, Optional
  import logging
  from rich.logging import RichHandler
  import re
  from ciphey.common import id_lambda
  from ciphey.iface import Decoder, registry
label_desc: Use image node_id 1 for calling a global function with example usage: _dispatch(ctext, func) and returns: result, None