code: def to_struct(model):
      """Cast instance of model to python structure.
  
      :param model: Model to be casted.
      :rtype: ``dict``
  
      """
      model.validate()
  
      resp = {}
      for _, name, field in model.iterate_with_name():
          value = field.__get__(model)
          if value is None:
              continue
  
          value = field.to_struct(value)
          resp[name] = value
      return resp
  
file_path: clearml/clearml/backend_api/session/jsonmodels/parsers.py
imports: import inspect
  from .None import fields, builders, errors
label_desc: Use image node_id 1 for calling a global function with example usage: to_struct(model) and returns: resp