code: def test_remove_nesting():
      """
      Test a few orders on nested items to make sure the desired results are coming back
      """
      # this should be unchanged
      result = convert_amt.remove_nesting(fake_docs(0, 1))
      assert result == fake_docs(0, 1)
  
      # this should be returned sorted
      result = convert_amt.remove_nesting(fake_docs(0, 4, 1))
      assert result == fake_docs(0, 1, 4)
  
      # this should just have one copy
      result = convert_amt.remove_nesting(fake_docs(0, 0))
      assert result == fake_docs(0)
  
      # outer one preferred
      result = convert_amt.remove_nesting(fake_docs(0, 2))
      assert result == fake_docs(2)
      result = convert_amt.remove_nesting(fake_docs(1, 2))
      assert result == fake_docs(2)
      result = convert_amt.remove_nesting(fake_docs(5, 2))
      assert result == fake_docs(2)
      # order doesn't matter
      result = convert_amt.remove_nesting(fake_docs(0, 4, 2))
      assert result == fake_docs(2, 4)
      result = convert_amt.remove_nesting(fake_docs(2, 4, 0))
      assert result == fake_docs(2, 4)
  
      # first one preferred
      result = convert_amt.remove_nesting(fake_docs(0, 3))
      assert result == fake_docs(0)
      result = convert_amt.remove_nesting(fake_docs(3, 0))
      assert result == fake_docs(3)
  
file_path: stanza/stanza/tests/ner/test_convert_amt.py
imports: import os
  import pytest
  import stanza
  from stanza.utils.datasets.ner import convert_amt
  from stanza.tests import TEST_MODELS_DIR
label_desc: Use image node_id 4 for calling a global function with example usage: test_remove_nesting() without return types