code: def build(
      project_path: str, cleanup: bool = True
  ) -> t.Generator[Bento, None, None]:
      """
      Build a BentoML project.
      """
      from bentoml import bentos
  
      print(f"Building bento: {project_path}")
      bento = bentos.build_bentofile(build_ctx=project_path)
      yield bento
      if cleanup:
          print(f"Deleting bento: {str(bento.tag)}")
          bentos.delete(bento.tag)
  
imports: from __future__ import annotations
  import asyncio
  import contextlib
  import itertools
  import os
  import socket
  import subprocess
  import sys
  import time
  import typing
  import urllib
  import urllib.error
  import urllib.request
  from contextlib import contextmanager
  from typing import TYPE_CHECKING
  import psutil
  from bentoml._internal.tag import Tag
  from bentoml._internal.utils import LazyLoader
  from bentoml._internal.utils import cached_contextmanager
  from bentoml._internal.utils import reserve_free_port
  from bentoml.grpc.utils import import_grpc
  from ..grpc.utils import LATEST_PROTOCOL_VERSION
label_desc: Use image node_id 2 for calling a global function with example usage: build(project_path, cleanup) without return types