code: def to_py_name(scala_name):
      name_mapping = {"w_regularizer": "W_regularizer"}
      result = []
      previous_is_lower = False
      for c in scala_name:
          if c.isupper() and previous_is_lower:
              result.append("_")
              previous_is_lower = False
          else:
              previous_is_lower = True
          result.append(c.lower())
      tmp_result = "".join(result)
      return name_mapping.get(tmp_result, tmp_result)
  
file_path: analytics-zoo/pyzoo/dev/auto_gen.py
imports: import re
label_desc: Use image node_id 3 for calling a global function with example usage: to_py_name(scala_name) and returns: name_mapping