parameters: (f, serp2=False)
return_statement: return footer
docstring: Creates the footer for use in the parse_dep
      function.
  
      Parameters
      ----------
      f : str
          f from parse_dep
      serp2 : bool
      True if serp2 dep file, False if serp1.  Default false
  
      Returns
      -------
      footer : str
          The footer to be appended to f
docstring_summary: Creates the footer for use in the parse_dep
      function.
docstring_tokens: Creates the footer for use in the parse_dep function .
function: def form_footer(f, serp2=False):
      '''Creates the footer for use in the parse_dep
      function.
  
      Parameters
      ----------
      f : str
          f from parse_dep
      serp2 : bool
      True if serp2 dep file, False if serp1.  Default false
  
      Returns
      -------
      footer : str
          The footer to be appended to f
      '''
  
      vol_name = ""
      if serp2:
          vol_name = "vol[col]"
      else:
          vol_name = "VOLUME"
      mat_gen_line = ('{name}MATERIAL = [{name}' + vol_name + ' *'
                     'Material(dict(zip(zai[:-2], {name}MDENS[:-2, col])))'
                     ' for col in cols]\n')
  
      footer = ""
      construct_string = ('\n\n# Construct materials\n'
                          'zai = list(map(int, ZAI))\n'
                          'cols = list(range(len(DAYS)))\n')
      if serp2:
          construct_string += '{name}vol = list(map(float, {name}VOLUME))\n'
      base_names = re.findall(r'(MAT_\w*_)MDENS = ', f)
      for base_name in base_names:
          footer += construct_string.format(name=base_name)
      for base_name in base_names:
          footer += mat_gen_line.format(name=base_name)
      footer += ('TOT_MATERIAL = [Material(dict(zip(zai[:-2], '
                 'TOT_MASS[:-2, col]))) for col in cols]\n')
      footer += "del zai, cols\n"
  
      return footer
function_tokens: def form_footer ( f , serp2 = False ) : vol_name = "" if serp2 : vol_name = "vol[col]" else : vol_name = "VOLUME" mat_gen_line = ( '{name}MATERIAL = [{name}' + vol_name + ' *' 'Material(dict(zip(zai[:-2], {name}MDENS[:-2, col])))' ' for col in cols]\n' ) footer = "" construct_string = ( '\n\n# Construct materials\n' 'zai = list(map(int, ZAI))\n' 'cols = list(range(len(DAYS)))\n' ) if serp2 : construct_string += '{name}vol = list(map(float, {name}VOLUME))\n' base_names = re . findall ( r'(MAT_\w*_)MDENS = ' , f ) for base_name in base_names : footer += construct_string . format ( name = base_name ) for base_name in base_names : footer += mat_gen_line . format ( name = base_name ) footer += ( 'TOT_MATERIAL = [Material(dict(zip(zai[:-2], ' 'TOT_MASS[:-2, col]))) for col in cols]\n' ) footer += "del zai, cols\n" return footer