code: def createFromAPIKey(self, apikey, maybeWriteDefault=False):
          
          self._data = {
              'default_key': 'default',
              'keys': {
                  'default': {
                      'key': apikey,
                      'desc': 'imported API key'
                  }
              }
          }
          self._keyID = 'default'
          self._doDefaults()
          if maybeWriteDefault:
              path = os.path.expanduser(self.DEFAULT_CONFIG_FILE)
              self.write(path)
docs: Create a basic config from a single API key
  
          :param str apikey: NS1 API Key, as created in the NS1 portal
          :param bool maybeWriteDefault: If True and DEFAULT_CONFIG_FILE doesn't\
              exist write out the resulting config there.