code: def upload_to_dev(logdir=None, model=None):
      if not logdir and not model:
          logger.error(
              "Must specify directory to upload via `--logdir` or specify model to upload via `--model`."
          )
          return
      walks = {}
      if logdir:
          walks = get_vdl_log_file(logdir)
          if not walks:
              logger.error("There is no valid log file in %s" % logdir)
              return
  
      res = apply_for_token()
  
      err_code = res.get("code")
      msg = res.get("msg")
  
      if "000000" == err_code:
          sts_ak = msg.get("sts_ak")
          sts_sk = msg.get("sts_sk")
          sts_token = msg.get("token")
          bucket_id = msg.get("dir")
      else:
          logger.error(msg)
          return
  
      if not sts_ak or not sts_sk or not sts_token:
          return
      bos_fs = bfile.BosConfigClient(
          bos_ak=sts_ak, bos_sk=sts_sk, bos_sts=sts_token
      )
  
      for key, value in walks.items():
          filename = bos_fs.join(key, value)
          bos_fs.upload_object_from_file(
              path=bucket_id, filename=filename
          )
  
      if model:
          if os.path.getsize(model) > 1024 * 1024 * 100:
              logger.error("Size of model must less than 100M.")
          else:
              bos_fs.upload_object_from_file(
                  path=bucket_id, filename=model
              )
      url = get_url(path=bucket_id, model=model)
  
      print("View your visualization results at: `%s`." % url)
  
file_path: VisualDL/visualdl/server/serve.py
imports: import requests
  import json
  import os
  from visualdl.io import bfile
  from visualdl.reader.reader import is_VDLRecord_file
  from visualdl.utils.dir import CONFIG_PATH
  from visualdl.server.log import logger
label_desc: Use image node_id 5 for calling a global function with example usage: upload_to_dev(logdir, model) without return types