code: def command_template(self):
          
          com_out = self.appname
          arg_string = ""
          flag_string = ""
          # Loop over the key, value pairs in self.args
  
          for key, val in self.args.items():
              # Check if the value is set in self._options
              # If so, get the value from there
              if val is None:
                  opt_val = self._options[key][0]
              else:
                  opt_val = val
              opt_type = self._options[key][2]
              if key == 'args':
                  # 'args' is special, pull it out and move it to the back
                  arg_string += ' {%s}' % key
              elif opt_type is bool:
                  if opt_val:
                      flag_string += ' --%s' % (key)
              elif opt_type is list:
                  if is_null(opt_val):
                      continue
                  elif isinstance(opt_val, str):
                      com_out += ' --%s %s' % (key, opt_val)
                  elif isinstance(opt_val, list):
                      for arg_val in opt_val:
                          com_out += ' --%s %s' % (key, arg_val)
              else:
                  com_out += ' --%s {%s}' % (key, key)
          com_out += flag_string
          com_out += arg_string
          return com_out
docs: Build and return a string that can be used as a template invoking
          this chain from the command line.
  
          The actual command can be obtainted by using
          `self.command_template().format(**self.args)`