code: def _set_gradient_checkpointing(self, module, value=False):
      if isinstance(module, XGLMModel):
          module.gradient_checkpointing = value
  
imports: import math
  import random
  from typing import List, 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 BaseModelOutputWithPastAndCrossAttentions, CausalLMOutputWithCrossAttentions
  from ...modeling_utils import PreTrainedModel
  from ...utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward, logging
  from .configuration_xglm import XGLMConfig
label_desc: Use image node_id 2 for calling the XGLMPreTrainedModel obj's underlying member method code with example usage: obj._set_gradient_checkpointing(module, value) without return types