code: def set_derived_configs(self):
      # set 'num-filters' or check it..
      input_dim = self.descriptors["input"]["dim"]
      height = self.config["height"]
  
      cur_num_filters = self.config["num-filters"]
      if cur_num_filters == -1:
          if input_dim % height != 0:
              raise RuntimeError(
                  "Specified image height {0} does not "
                  "divide the input dim {1}".format(height, input_dim)
              )
          self.config["num-filters"] = input_dim / height
      elif input_dim != cur_num_filters * height:
          raise RuntimeError(
              "Expected the input-dim to equal "
              "height={0} * num-filters={1} = {2}, but "
              "it is {3}".format(
                  height,
                  cur_num_filters,
                  height * cur_num_filters,
                  input_dim,
              )
          )
  
imports: from __future__ import print_function
  from __future__ import division
  import math
  import re
  import sys
  from libs.nnet3.xconfig.basic_layers import XconfigLayerBase
label_desc: Use image node_id 3 for calling the XconfigResBlock obj's underlying member method code with example usage: obj.set_derived_configs() without return types