code: def get_link(layer, base_ch, growth_rate, grmul):
      if layer == 0:
          return base_ch, 0, []
      out_channels = growth_rate
      link = []
      for i in range(10):
          dv = 2**i
          if layer % dv == 0:
              k = layer - dv
              link.insert(0, k)
              if i > 0:
                  out_channels *= grmul
      out_channels = int(int(out_channels + 1) / 2) * 2
      in_channels = 0
      for i in link:
          ch, _, _ = get_link(i, base_ch, growth_rate, grmul)
          in_channels += ch
      return out_channels, in_channels, link
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager
  from paddleseg.models import layers
  from paddleseg.utils import utils
label_desc: Use image node_id 1 for calling a global function with example usage: get_link(layer, base_ch, growth_rate, grmul) and returns: out_channels,  in_channels,  link, base_ch,  int,  list