docs: def add_argument(self, parser, path, name=None, schema=None, **kwargs):
          """
          Add an argument to the `parser` based on a schema definition.
  
          Parameters
          ----------
          parser : argparse.ArgumentParser
              parser to add an argument to
          path : str
              path in the configuration document to add an argument for
          name : str or None
              name of the command line parameter (defaults to the name in the schema)
          schema : dict
              JSON schema definition (defaults to the schema of the plugin)
  
          Returns
          -------
          arg :
              command line argument definition
          """
          schema = schema or self.SCHEMA
          name = name or ('--%s' % os.path.basename(path))
          self.arguments[name.strip('-')] = path
          # Build a path to the help in the schema
          path = util.split_path(path)
          path = os.path.sep.join(
              it.chain([os.path.sep], *zip(it.repeat("properties"), path)))
          property_ = util.get_value(schema, path)
          defaults = {
              'choices': property_.get('enum'),
              'help': property_.get('description')
          }
          if 'type' in property_:
              defaults['type'] = util.TYPES[property_['type']]
          defaults.update(kwargs)
          return parser.add_argument(name, **defaults)