code: def test_duration_nanos_pandas():
      import pandas as pd
  
      arr = pa.array([0, 3600000000000], type=pa.duration("ns"))
      expected = pd.Timedelta("1 hour")
      assert isinstance(arr[1].as_py(), pd.Timedelta)
      assert arr[1].as_py() == expected
      assert arr[1].value == expected.value
  
      # Non-zero nanos work fine
      arr = pa.array([946684800000000001], type=pa.duration("ns"))
      assert arr[0].as_py() == pd.Timedelta(
          946684800000000001, unit="ns"
      )
  
imports: import datetime
  import decimal
  import pytest
  import sys
  import weakref
  import numpy
  import pyarrow
  import pyarrow.compute
  from pyarrow.tests import util
label_desc: Use image node_id 26 for calling a global function with example usage: test_duration_nanos_pandas() without return types