code: def ensure_iterable_type(
      typ_: type,
  ) -> t.Callable[[t.MutableSequence[t.Any]], bool]:
      """Ensure that given mutable sequence has all elements of given types."""
  
      def v(value: t.MutableSequence[t.Any]) -> bool:
          return all(isinstance(i, typ_) for i in value)
  
      return v
  
imports: from __future__ import annotations
  import ipaddress
  import logging
  import os
  import re
  import typing
  from functools import singledispatch
  from typing import TYPE_CHECKING
  import schema
  import yaml
  from ...exceptions import BentoMLConfigException
  from ..utils import LazyLoader
label_desc: Use image node_id 12 for calling a global function with example usage: ensure_iterable_type(typ_) and returns: v, all