class_docstr: Base Class from Normalizing flows
  
  Args:
      model_config (BaseNFConfig): The configuration setting the main parameters of the
          model.
code: def _load_model_weights_from_folder(cls, dir_path):
      file_list = os.listdir(dir_path)
  
      if "model.pt" not in file_list:
          raise FileNotFoundError(
              f"Missing model weights file ('model.pt') file in"
              f"{dir_path}... Cannot perform model building."
          )
  
      path_to_model_weights = os.path.join(dir_path, "model.pt")
  
      try:
          model_weights = torch.load(
              path_to_model_weights, map_location="cpu"
          )
  
      except RuntimeError:
          RuntimeError(
              "Enable to load model weights. Ensure they are saves in a '.pt' format."
          )
  
      if "model_state_dict" not in model_weights.keys():
          raise KeyError(
              "Model state dict is not available in 'model.pt' file. Got keys:"
              f"{model_weights.keys()}"
          )
  
      model_weights = model_weights["model_state_dict"]
  
      return model_weights
  
imports: import os
  import sys
  from copy import deepcopy
  import numpy
  import torch
  import torch.nn
  from ....data.datasets import BaseDataset
  from ...auto_model import AutoConfig
  from ...base.base_config import EnvironmentConfig
  from ...base.base_utils import ModelOutput
  from .base_nf_config import BaseNFConfig
label_desc: Use image node_id 7 for calling the BaseNF obj's underlying member method code with example usage: obj._load_model_weights_from_folder(cls, dir_path) and returns: model_weights