code: def __init__(self, config: MgpstrConfig):
      super().__init__(config)
      self.config = config
      self.embeddings = MgpstrEmbeddings(config)
      self.encoder = MgpstrEncoder(config)
  
imports: import collections.abc
  from dataclasses import dataclass
  from typing import Optional, Tuple, Union
  import torch
  import torch.nn.functional
  import torch.utils.checkpoint
  from torch import nn
  from ...modeling_outputs import BaseModelOutput
  from ...modeling_utils import PreTrainedModel
  from ...utils import ModelOutput, add_start_docstrings, add_start_docstrings_to_model_forward, logging, replace_return_docstrings
  from .configuration_mgp_str import MgpstrConfig
label_desc: Use image node_id 1 to create a new MgpstrModel object from inherited base classes: MgpstrPreTrainedModel with example: obj = MgpstrModel(config)