code: def test_id_to_grp(self, grp_vectorizer_and_gtm):
      grp_vectorizer, _ = grp_vectorizer_and_gtm
      assert isinstance(grp_vectorizer.id_to_grp, dict)
      assert all(
          isinstance(key, int)
          for key in grp_vectorizer.id_to_grp.keys()
      )
      assert all(
          isinstance(val, str)
          for val in grp_vectorizer.id_to_grp.values()
      )
      assert len(grp_vectorizer.id_to_grp) == len(
          grp_vectorizer.vocabulary_grps
      )
  
imports: import pytest
  import numpy
  from scipy.sparse import coo_matrix
  from textacy import extract, representations
label_desc: Use image node_id 2 for calling the TestGroupVectorizer obj's underlying member method code with example usage: obj.test_id_to_grp(grp_vectorizer_and_gtm) without return types