code: def pack(self, value, nocheck=False, major=DEFAULT_KATCP_MAJOR):
          
          if value is None:
              value = self.get_default()
          if value is None:
              raise ValueError("Cannot pack a None value.")
          if not nocheck:
              self.check(value, major)
          return self.encode(value, major)
docs: Return the value formatted as a KATCP parameter.
  
          Parameters
          ----------
          value : object
              The value to pack.
          nocheck : bool, optional
              Whether to check that the value is valid before
              packing it.
          major : int, optional
              Major version of KATCP to use when interpreting types.
              Defaults to latest implemented KATCP version.
  
          Returns
          -------
          packed_value : str
              The unescaped KATCP string representing the value.