code: def get_valid_artifact_states_filter_query(
      valid_artifact_states: Sequence[
          "metadata_store_pb2.Artifact.State"
      ],
  ) -> str:
      """Returns a filter query for valid artifact states."""
      return f"state IN {q.to_sql_string(valid_artifact_states)}"
  
file_path: tfx/tfx/dsl/input_resolution/ops/ops_utils.py
imports: from typing import Dict, List, Optional, Sequence, Set
  from tfx import types
  from tfx.orchestration.portable.input_resolution import exceptions
  from tfx.orchestration.portable.mlmd import filter_query_builder
  from tfx.utils import typing_utils
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: get_valid_artifact_states_filter_query(valid_artifact_states) and returns: str, q