code: def from_config(variant: str) -> PPHGNetV2:
      if variant == "L":
          return PPHGNetV2(
              stem_channels=[3, 32, 48],
              stage_configs=[
                  StageConfig(48, 48, 128, 1, False, False, 3, 6),
                  StageConfig(128, 96, 512, 1, True, False, 3, 6),
                  StageConfig(512, 192, 1024, 3, True, True, 5, 6),
                  StageConfig(1024, 384, 2048, 1, True, True, 5, 6),
              ],
          )
      elif variant == "X":
          return PPHGNetV2(
              stem_channels=[3, 32, 64],
              stage_configs=[
                  StageConfig(64, 64, 128, 1, False, False, 3, 6),
                  StageConfig(128, 128, 512, 2, True, False, 3, 6),
                  StageConfig(512, 256, 1024, 5, True, True, 5, 6),
                  StageConfig(1024, 512, 2048, 2, True, True, 5, 6),
              ],
          )
      else:
          raise ValueError("Only variant L and X are supported")
  
imports: from __future__ import annotations
  from typing import NamedTuple
  from torch import nn
  from kornia.contrib.models.common import ConvNormAct
  from kornia.core import Module, Tensor, concatenate
  from kornia.core.check import KORNIA_CHECK
label_desc: Use image node_id 3 for calling the PPHGNetV2 obj's underlying member method code with example usage: obj.from_config(variant) and returns: PPHGNetV2, PPHGNetV2