code: def to_json_schema(cls):
      """Generate JSON schema for given class.
  
      :param cls: Class to be casted.
      :rtype: ``dict``
  
      """
      builder = build_json_schema(cls)
      return builder.build()
  
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 2 for calling a global function with example usage: to_json_schema(cls) and returns: builder