code: def test_to_tuples_na(self, tuples, na_tuple):
      # GH 18756
      idx = IntervalIndex.from_tuples(tuples)
      result = idx.to_tuples(na_tuple=na_tuple)
  
      # check the non-NA portion
      expected_notna = Index(com.asarray_tuplesafe(tuples[:-1]))
      result_notna = result[:-1]
      tm.assert_index_equal(result_notna, expected_notna)
  
      # check the NA portion
      result_na = result[-1]
      if na_tuple:
          assert isinstance(result_na, tuple)
          assert len(result_na) == 2
          assert all(isna(x) for x in result_na)
      else:
          assert isna(result_na)
  
imports: from itertools import permutations
  import re
  import numpy
  import pytest
  import pandas
  from pandas import Index, Interval, IntervalIndex, Timedelta, Timestamp, date_range, interval_range, isna, notna, timedelta_range
  import pandas._testing
  import pandas.core.common
label_desc: Use image node_id 30 for calling the TestIntervalIndex obj's underlying member method code with example usage: obj.test_to_tuples_na(tuples, na_tuple) without return types