code: def prepare_tag_handle(self, handle):
      if not handle:
          raise EmitterError("tag handle must not be empty")
      if handle[0] != "!" or handle[-1] != "!":
          raise EmitterError(
              "tag handle must start and end with '!': %r" % handle
          )
      for ch in handle[1:-1]:
          if not (
              "0" <= ch <= "9"
              or "A" <= ch <= "Z"
              or "a" <= ch <= "z"
              or ch in "-_"
          ):
              raise EmitterError(
                  "invalid character %r in the tag handle: %r"
                  % (ch, handle)
              )
      return handle
  
imports: from .error import YAMLError
  from .events import *
label_desc: Use image node_id 41 for calling the Emitter obj's underlying member method code with example usage: obj.prepare_tag_handle(handle) and returns: handle