docs: def write_json_file(argname, cmd, basename, filename):
      """
      Write JSON captured from the defined argname into the package's
      egg-info directory using the specified filename.
      """
  
      value = getattr(cmd.distribution, argname, None)
  
      if isinstance(value, dict):
          value = json.dumps(
              value, indent=4, sort_keys=True, separators=(',', ': '))
  
      cmd.write_or_delete_file(argname, filename, value, force=True)