input: Write a python function to filter prime numbers from a list.
  assert filter_primes([2, 3, 7, 11, 12, 15]) == [2, 3, 7, 11]
  assert filter_primes([4, 6, 8, 10, 13, 17, 19]) == [13, 17, 19]
  assert filter_primes([22, 25, 29, 31, 37, 40]) == [29, 31, 37]
output: def filter_primes(numbers):
      def is_prime(n):
          if n <= 1:
              return False
          for i in range(2, int(n**0.5) + 1):
              if n % i == 0:
                  return False
          return True
  
      return [num for num in numbers if is_prime(num)]