code: def test_idpattern_override(self):
      class PathPattern(Template):
          idpattern = r"[_a-z][._a-z0-9]*"
  
      m = Mapping()
      m.bag = Bag()
      m.bag.foo = Bag()
      m.bag.foo.who = "tim"
      m.bag.what = "ham"
      s = PathPattern("$bag.foo.who likes to eat a bag of $bag.what")
      self.assertEqual(s.substitute(m), "tim likes to eat a bag of ham")
  
imports: import unittest
  import string
  from string import Template
label_desc: Use image node_id 11 for calling the TestTemplate obj's underlying member method code with example usage: obj.test_idpattern_override() without return types