code: def _format_args():
      
      # Ensure we can run outside a application/request context.
      try:
          pretty_format = \
              current_app.config['JSONIFY_PRETTYPRINT_REGULAR'] and \
              not request.is_xhr
      except RuntimeError:
          pretty_format = False
  
      if pretty_format:
          return dict(
              indent=2,
              separators=(', ', ': '),
          )
      else:
          return dict(
              indent=None,
              separators=(',', ':'),
          )
docs: Get JSON dump indentation and separates.