code: def ResNet50(pretrained=None, **args):
      model = ResNet(layers=50, **args)
      if pretrained is not None:
          if not (
              os.path.isdir(pretrained)
              or os.path.exists(pretrained + ".pdparams")
          ):
              raise ValueError(
                  "Model pretrain path {} does not "
                  "exists.".format(pretrained)
              )
          param_state_dict = paddle.load(pretrained + ".pdparams")
          model.set_dict(param_state_dict)
      return model
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import math
  import paddle
  from paddle import ParamAttr
  import paddle.nn
  import paddle.nn.functional
  from paddle.nn.initializer import Normal
label_desc: Use image node_id 3 for calling a global function with example usage: ResNet50(pretrained) and returns: model