code: def from_template(cls, template):
          
          regex = r'#{\s*%s\s*}' % cls.ALLOWED_KEY
          keys = re.findall(regex, template)
          if len(keys) == 0:
              raise cls.Bad("Bad keys template: %s. Should be: \"%s\"" % (
                  template, "a = #{key1}, b = #{key2.key3} ..."))
          return keys
docs: extracts keys out of template in the form of: "a = #{key1}, b = #{key2.key3} ..."