code: def to_http_status(status_code: grpc.StatusCode) -> int:
      """
      Convert grpc.StatusCode to HTTPStatus.
      """
      status = grpc_status_to_http_status_map().get(
          status_code, HTTPStatus.INTERNAL_SERVER_ERROR
      )
  
      return status.value
  
imports: from __future__ import annotations
  import logging
  import typing
  from dataclasses import dataclass
  from functools import lru_cache
  from http import HTTPStatus
  from typing import TYPE_CHECKING
  from ..._internal.utils import resolve_user_filepath
  from ...exceptions import InvalidArgument
  from ._import_hook import LATEST_PROTOCOL_VERSION
  from ._import_hook import import_generated_stubs
  from ._import_hook import import_grpc
label_desc: Use image node_id 6 for calling a global function with example usage: to_http_status(status_code) and returns: status