code: def test_barplot_layout(df_fruits):
      "Test for Barplot layout"
  
      p_bar = df_fruits.plot_bokeh.bar(
          ylabel="Price per Unit [€]",
          title="Fruit prices per Year",
          alpha=0.6,
          show_figure=False,
      )
  
      p_stacked_bar = df_fruits.plot_bokeh.bar(
          ylabel="Price per Unit [€]",
          title="Fruit prices per Year",
          stacked=True,
          alpha=0.6,
          show_figure=False,
      )
  
      p_bar_pandas_backend = df_fruits.plot.bar(
          ylabel="Price per Unit [€]",
          title="Fruit prices per Year",
          alpha=0.6,
          show_figure=False,
      )
  
      p_stacked_bar_pandas_backend = df_fruits.plot.bar(
          ylabel="Price per Unit [€]",
          title="Fruit prices per Year",
          stacked=True,
          alpha=0.6,
          show_figure=False,
      )
  
      # Reset index, such that "fruits" is now a column of the DataFrame:
      df_fruits.reset_index(inplace=True)
  
      p_hbar = df_fruits.plot_bokeh(
          kind="barh",
          x="fruits",
          xlabel="Price per Unit [€]",
          title="Fruit prices per Year",
          alpha=0.6,
          legend="bottom_right",
          show_figure=False,
      )
  
      p_stacked_hbar = df_fruits.plot_bokeh.barh(
          x="fruits",
          stacked=True,
          xlabel="Price per Unit [€]",
          title="Fruit prices per Year",
          alpha=0.6,
          legend="bottom_right",
          show_figure=False,
      )
  
      p_hbar_pandas_backend = df_fruits.plot(
          kind="barh",
          x="fruits",
          xlabel="Price per Unit [€]",
          title="Fruit prices per Year",
          alpha=0.6,
          legend="bottom_right",
          show_figure=False,
      )
  
      p_stacked_hbar_pandas_backend = df_fruits.plot.barh(
          x="fruits",
          stacked=True,
          xlabel="Price per Unit [€]",
          title="Fruit prices per Year",
          alpha=0.6,
          legend="bottom_right",
          show_figure=False,
      )
  
      # Plot all barplot examples in a grid:
      output = pandas_bokeh.plot_grid(
          [
              [
                  p_bar,
                  p_stacked_bar,
                  p_bar_pandas_backend,
                  p_stacked_bar_pandas_backend,
              ],
              [
                  p_hbar,
                  p_stacked_hbar,
                  p_hbar_pandas_backend,
                  p_stacked_hbar_pandas_backend,
              ],
          ],
          width=450,
          show_plot=False,
          return_html=True,
      )
  
      # Output plot as HTML:
      with open(
          os.path.join(DIRECTORY, "Plots", "Barplot_layout.html"), "w"
      ) as f:
          f.write(output)
  
      assert True
  
imports: import os
  import numpy
  import pandas
  import pytest
  import pandas_bokeh
label_desc: Use image node_id 18 for calling a global function with example usage: test_barplot_layout(df_fruits) without return types