code: def test_field_type(field_type, valid_values, invalid_values):
      assert isinstance(field_type.type_name, str)
      assert isinstance(field_type.name, str)
  
      for valid_value in valid_values:
          field_type.validate(valid_value)
  
      for invalid_value in invalid_values:
          with pytest.raises(TypeError):
              field_type.validate(invalid_value)
  
file_path: mars/mars/serialization/serializables/tests/test_field_type.py
imports: from collections import namedtuple
  from datetime import datetime, timedelta, timezone
  import numpy
  import pandas
  import pytest
  from ....core import EntityData
  from ..None import FieldTypes
label_desc: Use image node_id 1 for calling a global function with example usage: test_field_type(field_type, valid_values, invalid_values) without return types