code: def tobytes(s, encoding="ascii", errors="strict"):
      if isinstance(s, str):
          return s.encode(encoding, errors)
      else:
          return bytes(s)
  
imports: import ast
  import string
label_desc: Use image node_id 9 for calling a global function with example usage: tobytes(s, encoding, errors) and returns: s, bytes