code: def pipe_sort(context=None, _INPUT=None, conf=None, **kwargs):
      test = kwargs.pop('pass_if', None)
      _pass = utils.get_pass(test=test)
      key_defs = imap(DotDict, utils.listize(conf['KEY']))
      get_value = partial(utils.get_value, **kwargs)
      parse_conf = partial(utils.parse_conf, parse_func=get_value, **kwargs)
      keys = imap(parse_conf, key_defs)
      order = ('%s%s' % ('-' if k.dir == 'DESC' else '', k.field) for k in keys)
      comparers = map(get_comparer, order)
      cmp_func = partial(multikeysort, comparers=comparers)
      _OUTPUT = _INPUT if _pass else iter(sorted(_INPUT, cmp=cmp_func))
      return _OUTPUT