code: def run_module_v1(self, module, argv: List) -> Any:
      parser = argparse.ArgumentParser(
          prog="hub run {}".format(module.name), add_help=False
      )
  
      arg_input_group = parser.add_argument_group(
          title="Input options",
          description="Data feed into the module.",
      )
      arg_config_group = parser.add_argument_group(
          title="Config options",
          description="Run configuration for controlling module behavior, optional.",
      )
  
      arg_config_group.add_argument(
          "--use_gpu",
          type=ast.literal_eval,
          default=False,
          help="whether use GPU for prediction",
      )
      arg_config_group.add_argument(
          "--batch_size",
          type=int,
          default=1,
          help="batch size for prediction",
      )
  
      module_type = module.type.lower()
      if module_type.startswith("cv"):
          arg_input_group.add_argument(
              "--input_path",
              type=str,
              default=None,
              help="path of image/video to predict",
              required=True,
          )
      else:
          arg_input_group.add_argument(
              "--input_text",
              type=str,
              default=None,
              help="text to predict",
              required=True,
          )
  
      args = parser.parse_args(argv)
  
      except_data_format = module.processor.data_format(
          module.default_signature
      )
      key = list(except_data_format.keys())[0]
      input_data = {
          key: [args.input_path]
          if module_type.startswith("cv")
          else [args.input_text]
      }
  
      return module(
          sign_name=module.default_signature,
          data=input_data,
          use_gpu=args.use_gpu,
          batch_size=args.batch_size,
      )
  
file_path: PaddleHub/paddlehub/commands/run.py
imports: import argparse
  import ast
  import os
  from typing import Any, List
  from paddlehub.compat.module.module_v1 import ModuleV1
  from paddlehub.commands import register
  from paddlehub.module.manager import LocalModuleManager
  from paddlehub.module.module import Module, InvalidHubModule
  from paddlehub.server.server import CacheUpdater
label_desc: Use image node_id 2 for calling the RunCommand obj's underlying member method code with example usage: obj.run_module_v1(module, argv) and returns: module