code: def load_models_using_filepattern(
              self, filename_pattern, model, glob_args, is_main_model=False,
              encoding='utf-8', add_to_local_models=True):
          
          if (model):
              self.update_model_in_repo_based_on_filename(model)
          filenames = glob.glob(filename_pattern, **glob_args)
          if len(filenames) == 0:
              raise IOError(
                  errno.ENOENT, os.strerror(errno.ENOENT), filename_pattern)
          loaded_models = []
          for filename in filenames:
              the_metamodel = MetaModelProvider.get_metamodel(model, filename)
              loaded_models.append(
                  self.load_model(the_metamodel, filename, is_main_model,
                                  encoding=encoding,
                                  add_to_local_models=add_to_local_models))
          return loaded_models
docs: add a new model to all relevant objects
  
          Args:
              filename_pattern: models to be loaded
              model: model holding the loaded models in its _tx_model_repository
                     field (may be None).
              glob_args: arguments passed to the glob.glob function.
  
          Returns:
              the list of loaded models