code: def create_bases(
      model: torch.nn.Module,
      device: Optional[str] = torch.device("cpu"),
      has_module: Optional[bool] = False,
  ):
      unwrapped_model = unwrap_model_fn(model)
      weight_state_0 = unwrapped_model.state_dict()
      bases = [
          rand_basis(weight_state_0, device) for _ in range(2)
      ]  # Use two bases
      bases = [normalize_filter(bs, weight_state_0) for bs in bases]
      bases = [ignore_bn(bs) for bs in bases]
  
      return bases
  
file_path: ml-cvnets/loss_landscape/landscape_utils.py
imports: import copy
  from typing import Dict, Optional
  import matplotlib.pyplot
  import numpy
  import torch
  from matplotlib import animation, cm
  from mpl_toolkits.mplot3d import Axes3D
  from utils.common_utils import unwrap_model_fn
label_desc: Use image node_id 4 for calling a global function with example usage: create_bases(model, device, has_module) and returns: bases