code: def template_subs_file(in_file, out_fobj, d):
      
      with open(in_file, 'r') as in_fobj:
          for line in in_fobj:
              out_fobj.write(line.format(**d))
docs: Substitute template arguments in in_file from variables in d, write the
      result to out_fobj.