code: def pack(self, value=None):
          
          if isinstance(value, type(self)):
              return value.pack()
  
          if value is None:
              value = self._value
  
          if value == 0:
              value = '00:00:00:00:00:00'
  
          value = value.split(':')
  
          try:
              return struct.pack('!6B', *[int(x, 16) for x in value])
          except struct.error as err:
              msg = "HWAddress error. "
              msg += "Class: {}, struct error: {} ".format(type(value).__name__,
                                                           err)
              raise exceptions.PackException(msg)
docs: Pack the value as a binary representation.
  
          If the passed value (or the self._value) is zero (int), then the pack
          will assume that the value to be packed is '00:00:00:00:00:00'.
  
          Returns
              bytes: The binary representation.
  
          Raises:
              struct.error: If the value does not fit the binary format.