code: def update_gtapp(gtapp, **kwargs):
      
      for key, val in kwargs.items():
          if key in ['pfiles', 'scratch']:
              continue
          if val is None:
              continue
          try:
              gtapp[key] = val
          except ValueError:
              raise ValueError(
                  "gtapp failed to set parameter %s %s" % (key, val))
          except KeyError:
              raise KeyError("gtapp failed to set parameter %s %s" % (key, val))
docs: Update the parameters of the object that can run ScienceTools applications
  
      Parameters
      ----------
  
      gtapp :  `GtApp.GtApp`
          Object that will run the application in question
  
      kwargs : arguments used to invoke the application