code: def make_linear_combination(
      *functions: Callable, weights: Optional[Sequence] = None
  ) -> Callable:
      """
      Takes the given functions and makes a function which returns the linear combination of the output of original
      functions. It works well with functions returning numpy arrays of the same shape.
  
      Args:
          *functions: Base functions for the linear combination.The functions shall have the same argument and if they
              return numpy arrays, the returned arrays shall have the same shape.
          weights: Coefficients of the functions in the linear combination. The i-th given function will be multiplied
              with weights[i].
  
      Todo:
          Doesn't it better to accept functions as a Collection explicitly?
  
      Returns:
          A function which returns the linear combination of the given functions output.
      """
      if weights is None:
          weights = np.ones(shape=(len(functions)))
      else:
          assert len(functions) == len(weights), (
              "the length of weights must be the "
              "same as the number of given functions"
          )
  
      def linear_combination(*args, **kwargs):
          return sum(
              (
                  weights[i] * functions[i](*args, **kwargs)
                  for i in range(len(weights))
              )
          )
  
      return linear_combination
  
imports: from typing import Callable, Optional, Sequence, Tuple
  import numpy
  from modAL.utils.data import modALinput
  from sklearn.base import BaseEstimator
label_desc: Use image node_id 1 for calling a global function with example usage: make_linear_combination() and returns: linear_combination, sum