code: def test_keep_nodes(self):
      cg = CGFull()
      g = cg.edges(
          pd.DataFrame(
              {
                  "x": ["m", "m", "m", "n", "m"],
                  "y": ["m", "a", "b", "c", "d"],
              }
          ),
          "x",
          "y",
      )
      assert g.keep_nodes(["z"])._nodes.to_dict(orient="records") == []
      assert g.keep_nodes(["m", "a"])._nodes.sort_values(
          by="id"
      ).to_dict(orient="records") == [{"id": "a"}, {"id": "m"}]
      assert g.keep_nodes(["m", "a", "b"])._edges.sort_values(
          by="y"
      ).to_dict(orient="records") == [
          {"x": "m", "y": "a"},
          {"x": "m", "y": "b"},
          {"x": "m", "y": "m"},
      ]
      assert g.keep_nodes(
          pd.Series(["m", "a", "b", "c"])
      )._nodes.sort_values(by="id").to_dict(orient="records") == [
          {"id": "a"},
          {"id": "b"},
          {"id": "c"},
          {"id": "m"},
      ]
  
imports: import os, pandas, pytest, unittest
  from graphistry.compute import ComputeMixin
  from graphistry.plotter import PlotterBase
  from graphistry.tests.common import NoAuthTestCase
label_desc: Use image node_id 13 for calling the TestComputeMixin obj's underlying member method code with example usage: obj.test_keep_nodes() without return types