docs: def _create_usm_user_obj(snmp_cred):
      """Creates the UsmUserData obj for the given credentials.
  
      This method creates an instance for the method hlapi.UsmUserData.
      The UsmUserData() allows the 'auth_protocol' and 'priv_protocol'
      to be undefined by user if their pass phrases are provided.
  
      :param snmp_cred: Dictionary of SNMP credentials.
             auth_user: SNMP user
             auth_protocol: Auth Protocol
             auth_prot_pp: Pass phrase value for AuthProtocol.
             priv_protocol:Privacy Protocol.
             auth_priv_pp: Pass phrase value for Privacy Protocol.
      :returns UsmUserData object as per given credentials.
      """
      auth_protocol = snmp_cred.get('auth_protocol')
      priv_protocol = snmp_cred.get('priv_protocol')
      auth_user = snmp_cred.get('auth_user')
      auth_prot_pp = snmp_cred.get('auth_prot_pp')
      auth_priv_pp = snmp_cred.get('auth_priv_pp')
  
      if ((not auth_protocol) and priv_protocol):
          priv_protocol = (
              MAPPED_SNMP_ATTRIBUTES['privProtocol'][priv_protocol])
          usm_user_obj = hlapi.UsmUserData(auth_user, auth_prot_pp,
                                           auth_priv_pp,
                                           privProtocol=priv_protocol)
      elif ((not priv_protocol) and auth_protocol):
          auth_protocol = (
              MAPPED_SNMP_ATTRIBUTES['authProtocol'][auth_protocol])
          usm_user_obj = hlapi.UsmUserData(auth_user, auth_prot_pp,
                                           auth_priv_pp,
                                           authProtocol=auth_protocol)
      elif not all([priv_protocol and auth_protocol]):
          usm_user_obj = hlapi.UsmUserData(auth_user, auth_prot_pp,
                                           auth_priv_pp)
      else:
          auth_protocol = (
              MAPPED_SNMP_ATTRIBUTES['authProtocol'][auth_protocol])
          priv_protocol = (
              MAPPED_SNMP_ATTRIBUTES['privProtocol'][priv_protocol])
          usm_user_obj = hlapi.UsmUserData(auth_user, auth_prot_pp,
                                           auth_priv_pp,
                                           authProtocol=auth_protocol,
                                           privProtocol=priv_protocol)
      return usm_user_obj