code: def _check_name(name: str) -> None:
      """Checks the user-provided pipeline name."""
      if not _LEGAL_NAME_PATTERN.fullmatch(name):
          raise ValueError(
              "User provided pipeline name % is illegal, please follow "
              "the pattern of [a-z0-9][a-z0-9-]{0,127}."
          )
  
imports: import random
  import re
  import string
  import typing
  from typing import Any, Dict, List, Mapping, Optional, Union
  from absl import logging
  from kfp.pipeline_spec import pipeline_spec_pb2
  from tfx.dsl.components.base import base_node
  from tfx.dsl.placeholder import placeholder
  from tfx.orchestration import data_types
  from tfx.orchestration import pipeline
  from tfx.orchestration.kubeflow import utils
  from tfx.orchestration.kubeflow.v2 import compiler_utils
  from tfx.orchestration.kubeflow.v2 import parameter_utils
  from tfx.orchestration.kubeflow.v2 import step_builder
  from tfx.types import channel_utils
  from google.protobuf import json_format
label_desc: Use image node_id 1 for calling a global function with example usage: _check_name(name) without return types