def _CreateOutputPluginFromArgs(self, collection_urn, args):

    output_plugin_class = self._FindOutputPluginByName(args.plugin)
    if output_plugin_class.args_type:
      output_plugin_args = self._InitRdfValueFromParsedArgs(
          output_plugin_class.args_type, args)
      if hasattr(output_plugin_args, "export_options"):
        export_options = self._InitRdfValueFromParsedArgs(
            export.ExportOptions, args)
        output_plugin_args.export_options = export_options
    else:
      output_plugin_args = None

    return output_plugin_class(source_urn=collection_urn,
                               args=output_plugin_args,
                               token=data_store.default_token)
Creates OutputPlugin using given args as constructor arguments.
dataset/ETHPy150Open google/grr/grr/tools/export_plugins/plugin.py/OutputPluginBasedExportPlugin._CreateOutputPluginFromArgs