code: def name_is_otel_safe(prefix: str, name: str) -> bool:
      """
      Return True if the provided name and prefix would result in a name that meets the OpenTelemetry standard.
  
      Legal names are defined here:
      https://opentelemetry.io/docs/reference/specification/metrics/api/#instrument-name-syntax
      """
      return bool(
          stat_name_otel_handler(
              prefix, name, max_length=OTEL_NAME_MAX_LENGTH
          )
      )
  
imports: from __future__ import annotations
  import datetime
  import logging
  import random
  import warnings
  from functools import partial
  from typing import TYPE_CHECKING, Callable, Iterable, Union
  from opentelemetry import metrics
  from opentelemetry.exporter.otlp.proto.http.metric_exporter import OTLPMetricExporter
  from opentelemetry.metrics import Observation
  from opentelemetry.sdk.metrics import MeterProvider
  from opentelemetry.sdk.metrics._internal.export import ConsoleMetricExporter, PeriodicExportingMetricReader
  from opentelemetry.sdk.resources import SERVICE_NAME, Resource
  from airflow.configuration import conf
  from airflow.metrics.protocols import Timer
  from airflow.metrics.validators import OTEL_NAME_MAX_LENGTH, AllowListValidator, ListValidator, get_validator, stat_name_otel_handler
label_desc: Use image node_id 4 for calling a global function with example usage: name_is_otel_safe(prefix, name) and returns: bool