original_docstring: Computes the forecasts for each of the models in the submodels
      array. The number of forecasts is set by horizon.
      
docstring: Computes the forecasts for each of the models in the submodels
  array. The number of forecasts is set by horizon.
docstring_tokens: Computes the forecasts for each of the models in the submodels array . The number of forecasts is set by horizon .
code: def compute_forecasts(submodels, horizon):
      """Computes the forecasts for each of the models in the submodels
      array. The number of forecasts is set by horizon.
      """
      forecasts = []
      for submodel in submodels:
          name = submodel["name"]
          trend = name
          seasonality = None
          if "," in name:
              _, trend, seasonality = name.split(",")
              args = [submodel, horizon, seasonality]
          else:
              args = [submodel, horizon]
  
          forecasts.append( \
              {"model": name,
               "point_forecast": SUBMODELS[trend](*args)})
      return forecasts
code_tokens: def compute_forecasts ( submodels , horizon ) : forecasts = [ ] for submodel in submodels : name = submodel [ "name" ] trend = name seasonality = None if "," in name : _ , trend , seasonality = name . split ( "," ) args = [ submodel , horizon , seasonality ] else : args = [ submodel , horizon ] forecasts . append ( { "model" : name , "point_forecast" : SUBMODELS [ trend ] ( * args ) } ) return forecasts
short_docstring: Computes the forecasts for each of the models in the submodels
  array.
short_docstring_tokens: Computes the forecasts for each of the models in the submodels array .
comment: """Computes the forecasts for each of the models in the submodels
      array. The number of forecasts is set by horizon.
      """