Here is one possible implementation with a function that takes a positive integer as an argument:
def sieve_of_eratosthenes(n):
  numbers = list(range(2, n + 1))
  primes = []
  while numbers:
    prime = numbers.pop(0)
    primes.append(prime)
    numbers = [num for num in numbers if num % prime != 0]
  return primes
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence