code: def escape(value):
      
  
      if isinstance(value, (tuple, list)):
          return "(" + ", ".join([escape(arg) for arg in value]) + ")"
      else:
          typ = by_python_type.get(value.__class__)
          if typ is None:
              raise InterfaceError(
                  "Unsupported python input: %s (%s)" % (value, value.__class__)
              )
  
          return typ.to_sql(value)
docs: Escape a single value.