code: def __init__(self, config):
      super(FERRETMetaModel, self).__init__(config)
      self.max_sample_point = 512
  
      if hasattr(config, "mm_vision_tower"):
          self.vision_tower = build_vision_tower(
              config, delay_load=True
          )
          self.mm_projector = nn.Linear(
              config.mm_hidden_size, config.hidden_size
          )
  
      if hasattr(config, "region_fea_adapter"):
          self.region_fea_adapter = nn.Linear(
              config.mm_hidden_size, config.hidden_size
          )
  
      if hasattr(config, "region_geo_sampler"):
          # pdb.set_trace()
          self.region_geo_sampler = GeoRegionSampler(
              input_dim=config.mm_hidden_size,
              output_dim=config.hidden_size,
              num_init_point=self.max_sample_point,
              num_sub_point=[128, 32],
              num_neighbor=[24, 24],
              pooler_mode=config.sampler_pooler_mode,
          )
  
imports: from abc import ABC, abstractmethod
  import torch
  import torch.nn
  import torch.nn.functional
  import math
  from .multimodal_encoder.builder import build_vision_tower
  import pdb
  from ferret.constants import IGNORE_INDEX, IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_PATCH_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN
label_desc: Use image node_id 1 to create a new FERRETMetaModel object  with example: obj = FERRETMetaModel(config)