code: def node_hist_fig(
      node_color_distribution,
      title="Graph Node Distribution",
      width=400,
      height=300,
      top=60,
      left=25,
      bottom=60,
      right=25,
      bgcolor="rgb(240,240,240)",
      y_gridcolor="white",
  ):
      
  
      text = [
          "{perc}%".format(**locals())
          for perc in [d["perc"] for d in node_color_distribution]
      ]
  
      pl_hist = go.Bar(
          y=[d["height"] for d in node_color_distribution],
          marker=dict(color=[d["color"] for d in node_color_distribution]),
          text=text,
          hoverinfo="y+text",
      )
  
      hist_layout = dict(
          title=title,
          width=width,
          height=height,
          font=dict(size=12),
          xaxis=dict(showline=True, zeroline=False, showgrid=False, showticklabels=False),
          yaxis=dict(showline=False, gridcolor=y_gridcolor, tickfont=dict(size=10)),
          bargap=0.01,
          margin=dict(l=left, r=right, b=bottom, t=top),
          hovermode="x",
          plot_bgcolor=bgcolor,
      )
  
      return go.FigureWidget(data=[pl_hist], layout=hist_layout)
docs: Define the plotly plot representing the node histogram
      
      Parameters
      ----------
      node_color_distribution: list of dicts describing the build_histogram
      width, height: integers -  width and height of the histogram FigureWidget
      left, top, right, bottom: ints; number of pixels around the FigureWidget
      bgcolor: rgb of hex color code for the figure background color
      y_gridcolor: rgb of hex color code for the yaxis y_gridcolor
  
      Returns
      -------
      FigureWidget object representing the histogram of the graph nodes