code: def install_API_key(api_key, profile_name='default'):
      
      fname = API_profile_fname(profile_name)
      if not os.path.isdir(os.path.dirname(fname)):
          os.makedirs(os.path.dirname(fname))
      with open(fname, 'w') as fh:
          fh.write(api_key)
docs: Put the given API key into the given profile name.