code: def _check_inputs(
      input_features: Iterable[LiteFeature],
      primitives: Union[List[Type[PrimitiveBase]], List[PrimitiveBase]],
  ) -> Tuple[Iterable[LiteFeature], List[PrimitiveBase]]:
      if not isinstance(input_features, Iterable):
          raise ValueError(
              "input_features must be an iterable of LiteFeature objects"
          )
  
      for feature in input_features:
          if not isinstance(feature, LiteFeature):
              raise ValueError(
                  "input_features must be an iterable of LiteFeature objects",
              )
  
      if not isinstance(primitives, List):
          raise ValueError(
              "primitives must be a list of Primitive classes or Primitive instances",
          )
  
      primitive_instances: List[PrimitiveBase] = []
      for primitive in primitives:
          if inspect.isclass(primitive) and issubclass(
              primitive, PrimitiveBase
          ):
              primitive_instances.append(primitive())
          elif isinstance(primitive, PrimitiveBase):
              primitive_instances.append(primitive)
          else:
              raise ValueError(
                  "primitives must be a list of Primitive classes or Primitive instances",
              )
  
      return (input_features, primitive_instances)
  
file_path: featuretools/featuretools/feature_discovery/feature_discovery.py
imports: import inspect
  from collections import defaultdict
  from itertools import combinations, permutations, product
  from typing import Iterable, List, Set, Tuple, Type, Union, cast
  from woodwork.column_schema import ColumnSchema
  from woodwork.logical_types import LogicalType
  from woodwork.table_schema import TableSchema
  from featuretools.feature_discovery.FeatureCollection import FeatureCollection
  from featuretools.feature_discovery.LiteFeature import LiteFeature
  from featuretools.feature_discovery.utils import column_schema_to_keys
  from featuretools.primitives.base.primitive_base import PrimitiveBase
  from featuretools.tests.testing_utils.generate_fake_dataframe import flatten_list
label_desc: Use image node_id 7 for calling a global function with example usage: _check_inputs(input_features, primitives) and returns: input_features,  primitive_instances