code: def add_patched_legend(ax, names):
      # matplotlib does not like labels starting with '_'
      patched_names = []
      for name in names:
          # remove leading '_' => here, this is almost OK: no signal transformation
          patched_name = name[2:] if (name.startswith("__")) else name
          patched_name = (
              patched_name[1:]
              if (patched_name.startswith("_"))
              else patched_name
          )
          patched_names = patched_names + [patched_name]
      ax.legend(patched_names)
  
file_path: atspy/atspy/TS/Plots.py
imports: import pandas
  import numpy
  from io import BytesIO
  import base64
label_desc: Use image node_id 1 for calling a global function with example usage: add_patched_legend(ax, names) without return types