code: def img_file(tmpdir: str) -> str:
      """Create a random image/bmp file."""
      from PIL.Image import fromarray
  
      img_file_ = tmpdir.join("test_img.bmp")
      img = fromarray(
          np.random.randint(255, size=(10, 10, 3)).astype("uint8")
      )
      img.save(str(img_file_))
      return str(img_file_)
  
imports: from __future__ import annotations
  import contextlib
  import os
  import tempfile
  import typing
  from typing import TYPE_CHECKING
  import psutil
  import pytest
  from pytest import MonkeyPatch
  import bentoml
  from bentoml._internal.configuration import BENTOML_VERSION
  from bentoml._internal.configuration import clean_bentoml_version
  from bentoml._internal.configuration.containers import BentoMLContainer
  from bentoml._internal.models import ModelContext
  from bentoml._internal.utils import LazyLoader
  from bentoml._internal.utils import validate_or_create_dir
label_desc: Use image node_id 15 for calling a global function with example usage: img_file(tmpdir) and returns: str