docs: def create_profile(hostname, username, password, profile_type, name, **kwargs):
      r'''
      A function to connect to a bigip device and create a profile.
  
      hostname
          The host/address of the bigip device
      username
          The iControl REST username
      password
          The iControl REST password
      profile_type
          The type of profile to create
      name
          The name of the profile to create
      kwargs
          [ arg=val ] ...
  
          Consult F5 BIGIP user guide for specific options for each profile type.
          Typically, tmsh arg names are used.
  
      Special Characters ``|``, ``,`` and ``:`` must be escaped using ``\`` when
      used within strings.
  
      '''
  
      ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''}
  
      if __opts__['test']:
          return _test_output(ret, 'create', params={
              'hostname': hostname,
              'username': username,
              'password': password,
              'profile_type': profile_type,
              'name': name
          })
  
      #is this profile currently configured?
      existing = __salt__['bigip.list_profile'](hostname, username, password, profile_type, name)
  
      # if it exists
      if existing['code'] == 200:
  
          ret['result'] = True
          ret['comment'] = 'A profile by this name currently exists.  No change made.'
  
      # if it doesn't exist
      elif existing['code'] == 404:
  
          response = __salt__['bigip.create_profile'](hostname, username, password, profile_type, name, **kwargs)
  
          if response['code'] == 200:
              ret['result'] = True
              ret['changes']['old'] = {}
              ret['changes']['new'] = response['content']
              ret['comment'] = 'Profile was successfully created.'
          else:
              ret = _load_result(response, ret)
  
      # else something else was returned
      else:
          ret = _load_result(existing, ret)
  
      return ret