code: def directions_layer(
      start,
      end,
      waypoints=None,
      avoid_ferries=False,
      travel_mode=DEFAULT_TRAVEL_MODE,
      avoid_highways=False,
      avoid_tolls=False,
      optimize_waypoints=False,
      show_markers=True,
      show_route=True,
      stroke_color=DEFAULT_STROKE_COLOR,
      stroke_weight=6.0,
      stroke_opacity=0.6,
  ):
      """
      Create a directions layer.
  
      Add this layer to a :class:`gmaps.Figure` instance to draw
      directions on the map.
  
      :Examples:
  
      {examples}
  
      {params}
  
      :returns:
          A :class:`gmaps.Directions` widget.
      """
      kwargs = {
          "start": start,
          "end": end,
          "waypoints": waypoints,
          "travel_mode": travel_mode,
          "avoid_ferries": avoid_ferries,
          "avoid_highways": avoid_highways,
          "avoid_tolls": avoid_tolls,
          "optimize_waypoints": optimize_waypoints,
          "show_markers": show_markers,
          "show_route": show_route,
          "stroke_color": stroke_color,
          "stroke_weight": stroke_weight,
          "stroke_opacity": stroke_opacity,
      }
      return Directions(**kwargs)
  
file_path: gmaps/gmaps/directions.py
imports: import ipywidgets
  import warnings
  from traitlets import Bool, Unicode, CUnicode, List, Enum, observe, validate, Float
  from .None import geotraitlets
  from .maps import GMapsWidgetMixin
  from ._docutils import doc_subst
label_desc: Use image node_id 3 for calling a global function with example usage: directions_layer(start, end, waypoints, avoid_ferries, travel_mode, avoid_highways, avoid_tolls, optimize_waypoints, show_markers, show_route, stroke_color, stroke_weight, stroke_opacity) and returns: Directions