input: Write a function to generate a histogram in Python using the provided data. The function should take as input a list of numbers and generate a histogram with specified bin ranges. The output should be a histogram plot with labeled axes and a title.
  
  import matplotlib.pyplot as plt
  
  def generate_histogram(data):
      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()
  
  assert generate_histogram([3, 5, 7, 2, 8, 10, 11, 65, 72, 81, 99, 100, 150])
  assert generate_histogram([1, 3, 4, 5, 22, 34, 45, 56, 67, 78, 89, 100, 123, 145, 167])
  assert generate_histogram([2, 4, 6, 8, 10, 12, 14, 16, 18, 20])
  assert generate_histogram([5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100])
  assert generate_histogram([])
output: def generate_histogram(data):
      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()