docs: def chain_functions(functions):
      """
      Chain a list of single-argument functions together and return.
  
      The functions are applied in list order, and the output of the
      previous functions is passed to the next function.
  
      Parameters
      ----------
      functions : list
          A list of single-argument functions to chain together.
  
      Returns
      -------
      func : callable
          A single argument function.
  
      Examples
      --------
      Chain several functions together!
  
          >>> funcs = [lambda x: x * 4, len, lambda x: x + 5]
          >>> func = chain_functions(funcs)
          >>> func('hey')
          17
  
      """
      functions = list(functions)
      if not functions:
          return _no_op
      elif len(functions) == 1:
          return functions[0]
      else:
          # See https://stackoverflow.com/a/39123400/1399279
          return partial(reduce, lambda res, f: f(res), functions)