code: def from_config(cls, config, src_dict, src_embedding):
      kernel_size_list = config.encoder_kernel_size_list
      layers = []
      # Overwrite the config.layer_config.encoder_embed_dim so that it will always match with config.encoder_config.encoder_embed_dim
      config.layer_config.encoder_embed_dim = (
          config.encoder_config.encoder_embed_dim
      )
      for size in kernel_size_list:
          assert (
              config.encoder_config.encoder_embed_dim
              == config.layer_config.encoder_embed_dim
          )
          layers.append(
              create_module(config.layer_config, kernel_size=size)
          )
      return cls(src_dict, src_embedding, layers, config.encoder_config)
  
imports: import math
  from typing import Dict, List, Optional, Union
  import torch
  import torch.nn
  import torch.nn.functional
  from pytext.config import ConfigBase
  from pytext.config.module_config import ModuleConfig
  from pytext.models.module import create_module
  from pytext.models.representations.transformer import PositionalEmbedding
  from pytext.models.seq_models.base import PlaceholderAttentionIdentity
  from pytext.models.seq_models.positional import PostionalEmbedCombine, PostionalEmbedType, SinusoidalPositionalEmbedding
  from torch import Tensor
  from torch.nn import LayerNorm
  from .attention import MultiheadAttention
  from .base import PlaceholderIdentity, PyTextSeq2SeqModule
  from .light_conv import LightweightConv
  from .nar_modules import NAREncoderUtility
  from .utils import Linear
label_desc: Use image node_id 1 for calling the LightConvEncoder obj's underlying member method code with example usage: obj.from_config(cls, config, src_dict, src_embedding) and returns: cls