<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_encapsulation(self, name, vid, default=False, disable=False):
 """Configures the subinterface encapsulation value Args: name (string):
 The interface identifier. It must be a full interface name (ie Ethernet, not Et) vid (int):
 The vlan id number default (boolean):
 Specifies to default the subinterface encapsulation disable (boolean):
 Specifies to disable the subinterface encapsulation Returns: True if the operation succeeds otherwise False is returned """

        if '.' not in name:
            raise NotImplementedError('parameter encapsulation can only be'
                                      ' set on subinterfaces')
        if name[0:2] not in ['Et', 'Po']:
            raise NotImplementedError('parameter encapsulation can only be'
                                      ' set on Ethernet and Port-Channel'
                                      ' subinterfaces')
        commands = ['interface %s' % name]
        commands.append(self.command_builder('encapsulation dot1q vlan',
                                             str(vid), default=default,
                                             disable=disable))
        return self.configure(commands)