docs: def update_config(cls, config_file, config):
          """ Update configuration if needed. """
          need_save = False
          # delete old env key
          if 'api' in config and 'env' in config['api']:
              del config['api']['env']
              need_save = True
          # convert old ssh_key configuration entry
          ssh_key = config.get('ssh_key')
          sshkeys = config.get('sshkey')
          if ssh_key and not sshkeys:
              config.update({'sshkey': [ssh_key]})
              need_save = True
          elif ssh_key and sshkeys:
              config.update({'sshkey': sshkeys.append(ssh_key)})
              need_save = True
          # remove old value
          if ssh_key:
              del config['ssh_key']
              need_save = True
  
          # save to disk
          if need_save:
              cls.save(config_file, config)