code: def private_vlan_type(self, **kwargs):
          
          name = kwargs.pop('name')
          pvlan_type = kwargs.pop('pvlan_type')
          callback = kwargs.pop('callback', self._callback)
          allowed_pvlan_types = ['isolated', 'primary', 'community']
  
          if not pynos.utilities.valid_vlan_id(name):
              raise InvalidVlanId("Incorrect name value.")
  
          if pvlan_type not in allowed_pvlan_types:
              raise ValueError("Incorrect pvlan_type")
  
          pvlan_args = dict(name=name, pvlan_type_leaf=pvlan_type)
          pvlan_type = getattr(self._interface,
                               'interface_vlan_interface_vlan_'
                               'private_vlan_pvlan_type_leaf')
          config = pvlan_type(**pvlan_args)
          return callback(config)
docs: Set the PVLAN type (primary, isolated, community).
  
          Args:
              name (str): VLAN ID.
              pvlan_type (str): PVLAN type (primary, isolated, community)
              callback (function): A function executed upon completion of the
                  method.  The only parameter passed to `callback` will be the
                  ``ElementTree`` `config`.
  
          Returns:
              Return value of `callback`.
  
          Raises:
              KeyError: if `name` or `pvlan_type` is not specified.
              ValueError: if `name` or `pvlan_type` is invalid.
  
          Examples:
              >>> import pynos.device
              >>> switches = ['10.24.39.211', '10.24.39.203']
              >>> auth = ('admin', 'password')
              >>> name = '90'
              >>> pvlan_type = 'isolated'
              >>> for switch in switches:
              ...     conn = (switch, '22')
              ...     with pynos.device.Device(conn=conn, auth=auth) as dev:
              ...         output = dev.interface.private_vlan_type(name=name,
              ...         pvlan_type=pvlan_type)
              ...         dev.interface.private_vlan_type()
              ...         # doctest: +IGNORE_EXCEPTION_DETAIL
              Traceback (most recent call last):
              KeyError