input: from typing import List
  
  def generate_histogram(data: List[int]) -> str:
      """ Generates a histogram in Python using provided data and binning.
      >>> generate_histogram([3, 5, 7, 2, 8, 10, 11, 65, 72, 81, 99, 100, 150])
      * plotting the histogram
      * x-axis label: Range of values
      * y-axis label: Number of Occurrences
      * plot title: Histogram of data
      * displaying the plot
      """
      import matplotlib.pyplot as plt
      
      # Fail-safe inclusion to ensure matplotlib is installed
      try:
          import matplotlib
          matplotlib.use('Agg')  # Ensures no interactive backend is required
      except ImportError:
          return "Matplotlib not installed. Please install it to generate plots."
      
      # Initial plot configurations
      plt.hist(data, bins=[0, 20, 40, 60, 80, 100, 120, 140, 160], edgecolor='black')
      plt.xlabel('Range of values')
      plt.ylabel('Number of Occurrences')
      plt.title('Histogram of data')
      
      # Shows the plot without blocking execution
      plt.show()
      return "* plotting the histogram\n* x-axis label: Range of values\n* y-axis label: Number of Occurrences\n* plot title: Histogram of data\n* displaying the plot"
output:     plt.close()