code: def persist_env(env_dict, profile):
      # TODO: Should we persist empty env_dict or notify user differently?
      path = get_config_path(profile)
  
      with open(path, "w") as f:
          json.dump(env_dict, f, indent=4, sort_keys=True)
  
      echo(
          "\nConfiguration successfully written to ",
          nl=False,
          bold=True,
      )
      echo('"%s"' % path, fg="cyan")
  
imports: import json
  import os
  import sys
  from os.path import expanduser
  from metaflow.util import to_unicode
  from metaflow._vendor import click
  from metaflow.util import to_unicode
  from .util import echo_always, makedirs
label_desc: Use image node_id 7 for calling a global function with example usage: persist_env(env_dict, profile) without return types