code: def _get_file_name_base_on_postfix(dir_path, postfix):
      r"""
      在dir_path中寻找后缀为postfix的文件.
      :param dir_path: str, 文件夹
      :param postfix: 形如".bin", ".json"等
      :return: str，文件的路径
      """
      files = list(
          filter(
              lambda filename: filename.endswith(postfix),
              os.listdir(os.path.join(dir_path)),
          )
      )
      if len(files) == 0:
          raise FileNotFoundError(
              f"There is no file endswith {postfix} file in {dir_path}"
          )
      elif len(files) > 1:
          raise FileExistsError(
              f"There are multiple *{postfix} files in {dir_path}"
          )
      return os.path.join(dir_path, files[0])
  
imports: import os
  import re
  import shutil
  import tempfile
  from pathlib import Path
  from urllib.parse import urlparse
  import requests
  from requests import HTTPError
  from fastNLP.core.log import logger
  from rich.progress import Progress, BarColumn, DownloadColumn, TimeRemainingColumn, TimeElapsedColumn
label_desc: Use image node_id 17 for calling a global function with example usage: _get_file_name_base_on_postfix(dir_path, postfix) and returns: os