def METHOD_NAME(self):
    func = self.spam
    self.assertEqual(sorted(func.get_parameters()), ["a", "b", "kw", "var"])
    expected = ["a", "b", "internal", "kw", "var", "x"]
    self.assertEqual(sorted(func.get_locals()), expected)
    self.assertEqual(sorted(func.get_globals()), ["bar", "glob"])
    self.assertEqual(self.internal.get_frees(), ("x",))