code: def transit_layer():
      """
      Transit layer.
  
      Adds information about public transport lines to the
      map. This only affects region for which Google has
      `public transport information
      <https://www.google.com/landing/transit/cities/index.html>`_.
  
      :returns:
          A :class:`gmaps.Transit` widget.
  
      :Examples:
  
      ::
  
          # map centered on London
          >>> fig = gmaps.figure(center=(51.5, -0.2), zoom_level=11)
          >>> fig.add_layer(gmaps.transit_layer())
          >>> fig
      """
      return Transit()
  
imports: import ipywidgets
  from traitlets import Unicode
  from .maps import GMapsWidgetMixin
label_desc: Use image node_id 1 for calling a global function with example usage: transit_layer() and returns: Transit