code: def make_reply(msgname, types, arguments, major):
      
      status = arguments[0]
      if status == "fail":
          return Message.reply(
              msgname, *pack_types((Str(), Str()), arguments, major))
      if status == "ok":
          return Message.reply(
              msgname, *pack_types((Str(),) + types, arguments, major))
      raise ValueError("First returned value must be 'ok' or 'fail'.")
docs: Helper method for constructing a reply message from a list or tuple.
  
      Parameters
      ----------
      msgname : str
          Name of the reply message.
      types : list of kattypes
          The types of the reply message parameters (in order).
      arguments : list of objects
          The (unpacked) reply message parameters.
      major : integer
          Major version of KATCP to use when packing types