def METHOD_NAME(self):
    self.add_argument('--triples', dest='triples', required=True)
    self.add_argument('--queries', dest='queries', default=None)
    self.add_argument('--collection', dest='collection', default=None)
    def check_training_input(args):
        assert (args.collection is None) == (args.queries is None), \
            "For training, both (or neither) --collection and --queries must be supplied." \
            "If neither is supplied, the --triples file must contain texts (not PIDs)."
    self.checks.append(check_training_input)