code: def to_py_constructor(scala_src):
      class_name = get_class_name(scala_src)
      scala_params = get_parameters(scala_src)
      py_params = to_py_params(scala_params)
  
      print("")
      doc_test = "  "
      init_content = """
          super(%s, self).__init__(None, bigdl_type, \n%s)
      """ % (
          class_name,
          format_py_params_for_value(py_params),
      )
      result = []
      result.append("class %s(Layer):" % class_name)
      result.append(4 * " " + "'''%s'''" % doc_test)
      result.append(
          4 * " "
          + """def __init__(self, \n%s,bigdl_type="float"):"""
          % format_py_params(py_params)
      )
      result.append(init_content)
      return "\n".join(result)
  
file_path: analytics-zoo/pyzoo/dev/auto_gen.py
imports: import re
label_desc: Use image node_id 10 for calling a global function with example usage: to_py_constructor(scala_src) and returns: str