code: def comp_pipe_handle(loc, tokens):
      
      internal_assert(len(tokens) >= 3 and len(tokens) % 2 == 1, "invalid composition pipe tokens", tokens)
      funcs = [tokens[0]]
      stars = []
      direction = None
      for i in range(1, len(tokens), 2):
          op, fn = tokens[i], tokens[i + 1]
          new_direction, star = comp_pipe_info(op)
          if direction is None:
              direction = new_direction
          elif new_direction != direction:
              raise CoconutDeferredSyntaxError("cannot mix function composition pipe operators with different directions", loc)
          funcs.append(fn)
          stars.append(star)
      if direction == "backwards":
          funcs.reverse()
          stars.reverse()
      func = funcs.pop(0)
      funcstars = zip(funcs, stars)
      return "_coconut_base_compose(" + func + ", " + ", ".join(
          "(%s, %s)" % (f, star) for f, star in funcstars
      ) + ")"
docs: Process pipe function composition.