import json


def PrettyPrint(contents):
  """Pretty prints a fieldtrial configuration.

  Args:
    contents: File contents as a string.

  Returns:
    Pretty printed file contents.
  """
  return json.dumps(json.loads(contents),
                    sort_keys=True, indent=4,
                    separators=(',', ': ')) + '\n'