code: def pack_rpc_payload(arg_format, args):
      
  
      code = _create_respcode(arg_format, args)
  
      packed_result = struct.pack(code, *args)
      unpacked_validation = struct.unpack(code, packed_result)
      if tuple(args) != unpacked_validation:
          raise RPCInvalidArgumentsError("Passed values would be truncated, please validate the size of your string",
                                         code=code, args=args)
      return packed_result
docs: Pack an RPC payload according to arg_format.
  
      Args:
          arg_format (str): a struct format code (without the <) for the
              parameter format for this RPC.  This format code may include the final
              character V, which means that it expects a variable length bytearray.
          args (list): A list of arguments to pack according to arg_format.
  
      Returns:
          bytes: The packed argument buffer.