code: def find_min_ir_version_for(
      opsetidlist: List[OperatorSetIdProto],
      ignore_unknown: bool = False,
  ) -> int:
      """Given list of opset ids, determine minimum IR version required.
  
      Arguments:
          opsetidlist (List[OperatorSetIdProto]): The list of OperatorSetIdProto
          ignore_unknown (bool): If True, ignore unknown domain and return default min version for that domain.
      Returns:
          The minimum IR version required (integer)
      """
      default_min_version = 3
  
      def find_min(domain: Union[str, None], version: int) -> int:
          key = (domain if domain else "ai.onnx", version)
          if key in OP_SET_ID_VERSION_MAP:
              return OP_SET_ID_VERSION_MAP[key]
          if ignore_unknown:
              return default_min_version
          raise ValueError("Unsupported opset-version.")
  
      if opsetidlist:
          return max(find_min(x.domain, x.version) for x in opsetidlist)
      return default_min_version
  
imports: import collections.abc
  import numbers
  import struct
  from cmath import isnan
  from typing import Any, Callable, Dict, KeysView, List, Optional, Sequence, Tuple, TypeVar, Union, cast
  import google.protobuf.message
  import numpy
  from onnx import IR_VERSION, AttributeProto, FunctionProto, GraphProto, MapProto, ModelProto, NodeProto, OperatorSetIdProto, OptionalProto, SequenceProto, SparseTensorProto, TensorProto, TensorShapeProto, TrainingInfoProto, TypeProto, ValueInfoProto, defs, mapping
label_desc: Use image node_id 2 for calling a global function with example usage: find_min_ir_version_for(opsetidlist, ignore_unknown) and returns: default_min_version, max, OP_SET_ID_VERSION_MAP, default_min_version