code: def maybe_resolve(
      maybe_placeholder: Any,
      resolution_context: Optional[
          placeholder_utils.ResolutionContext
      ] = None,
  ) -> Any:
      """Calls resolve() on placeholders, passes through all other inputs."""
      if isinstance(maybe_placeholder, placeholder_base.Placeholder):
          return resolve(maybe_placeholder, resolution_context)
      return maybe_placeholder
  
imports: from typing import Any, Optional
  from tfx.dsl.compiler import placeholder_utils
  from tfx.dsl.placeholder import placeholder_base
  from tfx.orchestration.portable import data_types
label_desc: Use image node_id 2 for calling a global function with example usage: maybe_resolve(maybe_placeholder, resolution_context) and returns: maybe_placeholder, resolve