docstr: Install module by PaddleHub and get info of this module.
docstr_tok: ["Install","module","by","PaddleHub","and","get","info","of","this","module","."]
code: def preinstall_modules(self):
      """
      Install module by PaddleHub and get info of this module.
      """
      for key, value in self.modules_info.items():
          init_args = value["init_args"]
          CacheUpdater(
              "hub_serving_start",
              module=key,
              version=init_args.get("version", "0.0.0"),
          ).start()
          if "directory" not in init_args:
              init_args.update({"name": key})
          m = hub.Module(**init_args)
          method_name = m.serving_func_name
          if method_name is None:
              raise RuntimeError(
                  "{} cannot be use for " "predicting".format(key)
              )
              exit(1)
          serving_method = getattr(m, method_name)
          category = str(m.type).split("/")[0].upper()
          self.modules_info[key].update(
              {
                  "method_name": method_name,
                  "version": m.version,
                  "category": category,
                  "module": m,
                  "name": m.name,
                  "serving_method": serving_method,
              }
          )
  
imports: import argparse
  import os
  import platform
  import json
  import multiprocessing
  import time
  import signal
  import paddlehub
  from paddlehub.commands import register
  from paddlehub.serving import app_compat
  from paddlehub.env import CONF_HOME
  from paddlehub.serving.http_server import run_all, StandaloneApplication
  from paddlehub.utils import log
  from paddlehub.utils.utils import is_port_occupied
  from paddlehub.server.server import CacheUpdater
label_desc: Use image node_id 5 for calling the ServingCommand obj's underlying member method code with example usage: obj.preinstall_modules() without return types