code: def pack(self, value=None):
          
          if value is None:
              output = self.header.pack()
              output += self.value.pack()
              return output
  
          elif isinstance(value, type(self)):
              return value.pack()
          else:
              msg = "{} is not an instance of {}".format(value,
                                                         type(self).__name__)
              raise PackException(msg)
docs: Pack the TLV in a binary representation.
  
          Returns:
              bytes: Binary representation of the struct object.
  
          Raises:
              :exc:`~.exceptions.ValidationError`: If validation fails.