import json


def format_json(data, default=None):
  """
  Pretty print JSON.

  Arguments:
      data (dict): JSON blob.

  Returns:
      str: Formatted JSON
  """
  return json.dumps(
    data, sort_keys=True, indent=2, separators=(",", ": "), default=default
  )