code: def test_inference_no_head_long(self):
      model = TFLongformerModel.from_pretrained(
          "allenai/longformer-base-4096"
      )
  
      # 'Hello world! ' repeated 1000 times
      input_ids = tf.convert_to_tensor(
          [[0] + [20920, 232, 328, 1437] * 1000 + [2]], dtype=tf.int64
      )
  
      attention_mask = tf.ones(shape_list(input_ids), dtype=tf.int64)
      global_attention_mask = tf.zeros(
          shape_list(input_ids), dtype=tf.int64
      )
      # Set global attention on a few random positions
      global_attention_mask = tf.tensor_scatter_nd_update(
          global_attention_mask,
          tf.constant([[0, 1], [0, 4], [0, 21]], dtype=tf.int64),
          tf.constant([1, 1, 1], dtype=tf.int64),
      )
  
      output = model(
          input_ids,
          attention_mask=attention_mask,
          global_attention_mask=global_attention_mask,
      )[0]
  
      expected_output_sum = tf.constant(74585.875)
      expected_output_mean = tf.constant(0.024267)
  
      # assert close
      tf.debugging.assert_near(
          tf.reduce_sum(output),
          expected_output_sum,
          rtol=1e-4,
          atol=1e-4,
      )
      tf.debugging.assert_near(
          tf.reduce_mean(output),
          expected_output_mean,
          rtol=1e-4,
          atol=1e-4,
      )
  
imports: import unittest
  from transformers import is_tf_available
  from transformers.testing_utils import require_sentencepiece, require_tf, require_tokenizers, slow, tooslow
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_tf_common import TFModelTesterMixin, ids_tensor, random_attention_mask
label_desc: Use image node_id 10 for calling the TFLongformerModelIntegrationTest obj's underlying member method code with example usage: obj.test_inference_no_head_long() without return types