docs: def mode(self, predicate, args, recall=1, head=False):
          '''
          Emits mode declarations in Aleph-like format.
  
              :param predicate: predicate name
              :param args: predicate arguments with input/output specification, e.g.:
  
              >>> [('+', 'train'), ('-', 'car')]
  
              :param recall: recall setting (see `Aleph manual <http://www.cs.ox.ac.uk/activities/machinelearning/Aleph/aleph>`_)
              :param head: set to True for head clauses
          '''
          return ':- mode%s(%s, %s(%s)).' % (
              'h' if head else 'b', str(recall), predicate, ','.join([t + arg for t, arg in args]))