code: def layer_init(
      layer: torch.nn.Module,
      std: float = math.sqrt(2),
      bias_const: float = 0.0,
      ortho_init: bool = True,
  ):
      if ortho_init:
          torch.nn.init.orthogonal_(layer.weight, std)
          torch.nn.init.constant_(layer.bias, bias_const)
      return layer
  
file_path: pytorch-lightning/examples/fabric/reinforcement_learning/rl/utils.py
imports: import argparse
  import math
  import os
  from distutils.util import strtobool
  from typing import TYPE_CHECKING, Optional, Union
  import gymnasium
  import torch
  from torch.utils.tensorboard import SummaryWriter
label_desc: Use image node_id 2 for calling a global function with example usage: layer_init(layer, std, bias_const, ortho_init) and returns: layer