code: def convert_dash(mpl_dash):
      """Convert mpl line symbol to plotly line symbol and return symbol."""
      if mpl_dash in DASH_MAP:
          return DASH_MAP[mpl_dash]
      else:
          dash_array = mpl_dash.split(",")
  
          if len(dash_array) < 2:
              return "solid"
  
          # Catch the exception where the off length is zero, in case
          # matplotlib 'solid' changes from '10,0' to 'N,0'
          if math.isclose(float(dash_array[1]), 0.0):
              return "solid"
  
          # If we can't find the dash pattern in the map, convert it
          # into custom values in px, e.g. '7,5' -> '7px,5px'
          dashpx = ",".join([x + "px" for x in dash_array])
  
          # TODO: rewrite the convert_dash code
          # only strings 'solid', 'dashed', etc allowed
          if dashpx == "7.4px,3.2px":
              dashpx = "dashed"
          elif dashpx == "12.8px,3.2px,2.0px,3.2px":
              dashpx = "dashdot"
          elif dashpx == "2.0px,3.3px":
              dashpx = "dotted"
          return dashpx
  
imports: import math
  import datetime
  import warnings
  import matplotlib.dates
label_desc: Use image node_id 3 for calling a global function with example usage: convert_dash(mpl_dash) and returns: DASH_MAP, dashpx, str, str