docs: def generate_kcorrection_polynomial_database(
          log,
          restFrameFilter,
          pathToOutputDirectory,
          kCorPolyOrder=3,
          kCorMinimumDataPoints=3,
          redshiftResolution=0.1,
          redshiftLower=0.0,
          redshiftUpper=1.0,
          plot=False):
      """
      *Generate the Kg* k-correction polynoimal for a range of redshifts given a list of spectra*
  
      **Key Arguments:**
          - ``log`` -- logger
          - ``restFrameFilter`` -- the observed frame filter with which to calculate k-corrections with
          - ``pathToOutputDirectory`` -- path to the output directory (provided by the user)
          - ``kCorPolyOrder`` -- the order of the polynomials to fit
          - ``kCorMinimumDataPoints`` -- Minimum number of datapoints used to generate k-correction curve
          - ``redshiftResolution`` -- resolution of the k-correction database (at what redshift points do you want the k-corrections calculated)
          - ``redshiftLower`` -- lower redshift in range of k-corrections to be calculated
          - ``redshiftUpper`` -- upper redshift in range of k-corrections to be calculated
          - ``plot`` -- plot the polynomial?
  
      **Return:**
          - None
      """
      ################ > IMPORTS ################
      ## STANDARD LIB ##
      import re
      import os
      ## THIRD PARTY ##
      import pysynphot as syn
      import yaml
      ## LOCAL APPLICATION ##
  
      mul = 1000
      div = 1000.
  
      fileName = pathToOutputDirectory + "/transient_light_curves.yaml"
      stream = file(fileName, 'r')
      generatedLCs = yaml.load(stream)
      models = generatedLCs.keys()
      filters = ['g', 'r', 'i', 'z']
      # models = ["he130",]
      for model in models:
  
          for redshift in range(int(redshiftLower * mul), int(redshiftUpper * mul), int(redshiftResolution * mul)):
              redshift = redshift / div
  
              for ffilter in filters:
                  generate_single_kcorrection_polynomial(
                      log,
                      model=model,
                      pathToOutputDirectory=pathToOutputDirectory,
                      redshift=redshift,
                      ffilter=ffilter,
                      restFrameFilter=restFrameFilter,
                      kCorPolyOrder=kCorPolyOrder,
                      kCorMinimumDataPoints=kCorMinimumDataPoints,
                      plot=plot)
  
      return