docstr: Run as a command.
docstr_tok: ["Run","as","a","command","."]
code: def run_cmd(self, argvs):
      """
      Run as a command.
      """
      self.parser = argparse.ArgumentParser(
          description="Run the {} module.".format(self.name),
          prog="hub run {}".format(self.name),
          usage="%(prog)s",
          add_help=True,
      )
      self.parser.add_argument(
          "--input_path", type=str, help="Path to image."
      )
      self.parser.add_argument(
          "--output_dir",
          type=str,
          default="swin2sr_real_sr_x4_output",
          help="The directory to save output images.",
      )
      args = self.parser.parse_args(argvs)
      self.real_sr(
          image=args.input_path,
          visualization=True,
          output_dir=args.output_dir,
      )
      return "Results are saved in %s" % args.output_dir
  
imports: import argparse
  import base64
  import os
  import time
  from typing import Union
  import cv2
  import numpy
  import paddle
  import paddle.nn
  from .swin2sr import Swin2SR
  from paddlehub.module.module import moduleinfo
  from paddlehub.module.module import runnable
  from paddlehub.module.module import serving
label_desc: Use image node_id 5 for calling the SwinIRMRealSR obj's underlying member method code with example usage: obj.run_cmd(argvs) and returns: unknown