def METHOD_NAME(kwds):
    "Run generator code based on provided set of arguments"
    config = dict(kwds)
    tmpl   = kwds.get('tmpl')
    stand_alone_group = ['Record', 'Skeleton']
    config.update({'not_in_dir': stand_alone_group})
    if  tmpl in stand_alone_group:
        whereami, ldir = test_cms_environment(tmpl)
        dirs = ldir.split('/')
        config.update({'pkgname': kwds.get('pname')})
        config.update({'subsystem': 'Subsystem'})
        config.update({'pkgname': 'Package'})
        if  whereami:
            if  len(dirs) >= 3:
                config.update({'subsystem': dirs[1]})
                config.update({'pkgname': dirs[2]})
            elif len(dirs) >= 2:
                config.update({'subsystem': dirs[1]})
                config.update({'pkgname': dirs[1]})
    else:
        whereami, ldir = test_cms_environment(tmpl)
        dirs = ldir.split('/')
        if  not dirs or not whereami:
            print(cms_error())
            sys.exit(1)
        config.update({'subsystem': dirs[1]})
        config.update({'pkgname': kwds.get('pname')})
        if  whereami in ['src', 'plugins']:
            config.update({'working_dir': whereami})
            config.update({'tmpl_files': '.cc'})
            config.update({'pkgname': dirs[2]})
        elif whereami == 'test':
            config.update({'working_dir': whereami})
            config.update({'tmpl_files':'.cc'})
            config.update({'pkgname': dirs[2]})
        elif whereami == 'subsystem':
            config.update({'tmpl_files': 'all'})
        else:
            print(cms_error())
            sys.exit(1)
    obj = code_generator(config)
    obj.METHOD_NAME()