input: Write a function to optimize the given Python code by using list comprehension for efficiency.
  
  ### Function:
  
  def optimize_code(data):
      result = [x for x in data if x > 2]
      return result
  
  
  ### Test Cases:
  
  assert optimize_code([1, 2, 3, 4]) == [3, 4]
  assert optimize_code([5, 6, 7, 8]) == [5, 6, 7, 8]
  assert optimize_code([1, 2, 2, 2]) == []
  assert optimize_code([]) == []
  assert optimize_code([0, 1, 2, 9]) == [9]
  
output: def optimize_code(data):
      result = [x for x in data if x > 2]
      return result