def _type_check(self, type_constraint, datum, is_input):
    datum_type = 'input' if is_input else 'output'

    try:
      check_constraint(type_constraint, datum)
    except CompositeTypeHintError as e:
      raise TypeCheckError, e.message, sys.exc_info()[2]
    except SimpleTypeHintError:
      error_msg = ("According to type-hint expected %s should be of type %s. "
                   "Instead, received '%s', an instance of type %s."
                   % (datum_type, type_constraint, datum, type(datum)))
      raise TypeCheckError, error_msg, sys.exc_info()[2]
test if the API is considering the colletion on filter
dataset/ETHPy150Open GoogleCloudPlatform/DataflowPythonSDK/google/cloud/dataflow/typehints/typecheck.py/TypeCheckWrapperDoFn._type_check--crossover with--dataset/ETHPy150Open scieloorg/scielo-manager/scielomanager/api/tests_resources_v2.py/IssuesRestAPITest.test_if_the_returned_list_are_from_correct_collection