code: def test_time_types():
      t1 = pa.time32("s")
      t2 = pa.time32("ms")
      t3 = pa.time64("us")
      t4 = pa.time64("ns")
  
      assert t1.unit == "s"
      assert t2.unit == "ms"
      assert t3.unit == "us"
      assert t4.unit == "ns"
  
      assert str(t1) == "time32[s]"
      assert str(t4) == "time64[ns]"
  
      with pytest.raises(ValueError):
          pa.time32("us")
  
      with pytest.raises(ValueError):
          pa.time64("s")
  
imports: from collections import OrderedDict
  import sys
  import weakref
  import pytest
  import numpy
  import pyarrow
  import pyarrow.tests.util
  from pyarrow.vendored.version import Version
label_desc: Use image node_id 10 for calling a global function with example usage: test_time_types() without return types