input: Write a function that generates a Python class for an online store item with fields for ID, name, price, and description. The class should include an initialization method to set these fields, a __str__ method to return a formatted string of the item's name and price, and a to_dict method to return a dictionary representation of the item.
  
  class StoreItem:
      def __init__(self, item_id, name, price, description):
          self.item_id = item_id
          self.name = name
          self.price = price
          self.description = description
  
      def __str__(self):
          return f'{self.name}, ${self.price}'
  
      def to_dict(self):
          return {
              'item_id': self.item_id,
              'name': self.name,
              'price': self.price,
              'description': self.description
          }
  
  # Test cases
  assert str(StoreItem(1, "Laptop", 999.99, "High-end gaming laptop")) == "Laptop, $999.99"
  assert StoreItem(2, "Book", 29.99, "Best-selling novel").to_dict() == {'item_id': 2, 'name': 'Book', 'price': 29.99, 'description': 'Best-selling novel'}
  assert str(StoreItem(3, "Headphones", 149.99, "Noise-cancelling headphones")) == "Headphones, $149.99"
  assert StoreItem(4, "Phone", 799.99, "Latest smartphone model").to_dict() == {'item_id': 4, 'name': 'Phone', 'price': 799.99, 'description': 'Latest smartphone model'}
  assert str(StoreItem(5, "Monitor", 299.99, "27-inch 4K monitor")) == "Monitor, $299.99"
output: class StoreItem:
      def __init__(self, item_id, name, price, description):
          self.item_id = item_id
          self.name = name
          self.price = price
          self.description = description
  
      def __str__(self):
          return f'{self.name}, ${self.price}'
  
      def to_dict(self):
          return {
              'item_id': self.item_id,
              'name': self.name,
              'price': self.price,
              'description': self.description
          }