class_docstr: A base class providing the backwards-compatible spawn API for Pexpect.
  
  This should not be instantiated directly: use :class:`pexpect.spawn` or
  :class:`pexpect.fdpexpect.fdspawn`.
code: def _pattern_type_err(self, pattern):
      raise TypeError(
          "got {badtype} ({badobj!r}) as pattern, must be one"
          " of: {goodtypes}, pexpect.EOF, pexpect.TIMEOUT".format(
              badtype=type(pattern),
              badobj=pattern,
              goodtypes=", ".join(
                  [str(ast) for ast in self.allowed_string_types]
              ),
          )
      )
  
imports: from io import StringIO, BytesIO
  import codecs
  import os
  import sys
  import re
  import errno
  from .exceptions import ExceptionPexpect, EOF, TIMEOUT
  from .expect import Expecter, searcher_string, searcher_re
label_desc: Use image node_id 9 for calling the SpawnBase obj's underlying member method code with example usage: obj._pattern_type_err(pattern) without return types