parameters: (file_descriptor, package, version, proto_printer)
docstring: Write the given extended file descriptor to the printer.
docstring_summary: Write the given extended file descriptor to the printer.
docstring_tokens: Write the given extended file descriptor to the printer .
function: def _WriteFile(file_descriptor, package, version, proto_printer):
      """Write the given extended file descriptor to the printer."""
      proto_printer.PrintPreamble(package, version, file_descriptor)
      _PrintEnums(proto_printer, file_descriptor.enum_types)
      _PrintMessages(proto_printer, file_descriptor.message_types)
      custom_json_mappings = _FetchCustomMappings(
          file_descriptor.enum_types, file_descriptor.package)
      custom_json_mappings.extend(
          _FetchCustomMappings(
              file_descriptor.message_types, file_descriptor.package))
      for mapping in custom_json_mappings:
          proto_printer.PrintCustomJsonMapping(mapping)
function_tokens: def _WriteFile ( file_descriptor , package , version , proto_printer ) : proto_printer . PrintPreamble ( package , version , file_descriptor ) _PrintEnums ( proto_printer , file_descriptor . enum_types ) _PrintMessages ( proto_printer , file_descriptor . message_types ) custom_json_mappings = _FetchCustomMappings ( file_descriptor . enum_types , file_descriptor . package ) custom_json_mappings . extend ( _FetchCustomMappings ( file_descriptor . message_types , file_descriptor . package ) ) for mapping in custom_json_mappings : proto_printer . PrintCustomJsonMapping ( mapping )