parameters: (self, s, args, kwargs)
return_statement: return type(s)(rv)
docstring: If a format call is detected, then this is routed through this
          method so that our safety sandbox can be used for it.
docstring_summary: If a format call is detected, then this is routed through this
          method so that our safety sandbox can be used for it.
docstring_tokens: If a format call is detected then this is routed through this method so that our safety sandbox can be used for it .
function: def format_string(self, s, args, kwargs):
          """If a format call is detected, then this is routed through this
          method so that our safety sandbox can be used for it.
          """
          if isinstance(s, Markup):
              formatter = SandboxedEscapeFormatter(self, s.escape)
          else:
              formatter = SandboxedFormatter(self)
          kwargs = _MagicFormatMapping(args, kwargs)
          rv = formatter.vformat(s, args, kwargs)
          return type(s)(rv)
function_tokens: def format_string ( self , s , args , kwargs ) : if isinstance ( s , Markup ) : formatter = SandboxedEscapeFormatter ( self , s . escape ) else : formatter = SandboxedFormatter ( self ) kwargs = _MagicFormatMapping ( args , kwargs ) rv = formatter . vformat ( s , args , kwargs ) return type ( s ) ( rv )