def METHOD_NAME(self, obj):
    """
    Defined to generate files for generated code products.
    @param obj: the instance of the model to visit.
    """
    # Check for command dir here and if none create it but always switch into it
    if not os.path.exists(self.__cmd_dir):
        os.mkdir(self.__cmd_dir)
    os.chdir(self.__cmd_dir)
    # Iterate over types
    for k in list(obj.get_base_id_dict().keys()):
        tlist = obj.get_base_id_dict()[k]
        # print "Type: %s\n" % k,
        # Iterate over instances and get name
        # Open file if commands exist if not do nothing
        for t in tlist:
            # print "\tInstance: %s, Base ID: %s\n" % (t[0],t[1])
            name = t[0]
            cmd_list = t[3].get_comp_xml().get_commands()
            if len(cmd_list) > 0:
                filename = "%s_commands.html" % t[0]
                # Open file for writing here...
                DEBUG.info("Open file: %s" % filename)
                try:
                    self.__fp_dict[name] = open(filename, "w")
                    DEBUG.info("Completed")
                except OSError:
                    PRINT.info("Could not open %s file." % filename)
                    sys.exit(-1)
                DEBUG.info(
                    "Generating HTML Command Table for %s:%s component instance..."
                    % (t[0], k)
                )
    os.chdir("..")