input: Write a function to generate a histogram in Python using the given data, with specified bins and axis labels. The function should take the data as input, use the matplotlib.pyplot library to create the histogram, and display it.
  
  def generate_histogram(data):
      import matplotlib.pyplot as plt
      
      # plotting the histogram 
      plt.hist(data, bins = [0, 20, 40, 60, 80, 100, 120, 140, 160], edgecolor = 'black') 
        
      # x-axis label 
      plt.xlabel('Range of values') 
      # y-axis label 
      plt.ylabel('Number of Occurrences') 
      # plot title 
      plt.title('Histogram of data') 
        
      # function to show the plot 
      plt.show()
  
  assert generate_histogram([3, 5, 7, 2, 8, 10, 11, 65, 72, 81, 99, 100, 150])
  assert generate_histogram([1, 2, 3, 4, 5])
  assert generate_histogram([10, 20, 30, 40, 50, 60, 70, 80, 90, 100])
  assert generate_histogram([7, 8, 9, 10])
  assert generate_histogram([])
output: def generate_histogram(data):
      import matplotlib.pyplot as plt
      
      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')
      plt.show()