<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def make_reply(msgname, types, arguments, major):
 """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 """

    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'.")