code: def _split_heads(self, x, n_head, dim_head, mp_num):
      reshaped = x.reshape(x.shape[:-1] + (n_head // mp_num, dim_head))
      reshaped = reshaped.reshape(
          x.shape[:-2] + (-1,) + reshaped.shape[-1:]
      )
      return reshaped
  
imports: from typing import Optional, Tuple, Union
  import torch
  import torch.utils.checkpoint
  from torch import nn
  from torch.nn import CrossEntropyLoss
  from ...activations import ACT2FN
  from ...modeling_outputs import BaseModelOutputWithPast, CausalLMOutputWithPast
  from ...modeling_utils import PreTrainedModel
  from ...utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward, logging
  from .configuration_codegen import CodeGenConfig
label_desc: Use image node_id 2 for calling the CodeGenAttention obj's underlying member method code with example usage: obj._split_heads(x, n_head, dim_head, mp_num) and returns: reshaped