code: def primes_sieve(limit):
      a = [True] * limit  # Initialize the primality list
      a[0] = a[1] = False
      primes = list()
  
      for i, isprime in enumerate(a):
          if isprime:
              primes.append(i)
              for n in range(i * i, limit, i):  # Mark factors non-prime
                  a[n] = False
  
      return primes
  
label_desc: Use image node_id 1 for calling a global function with example usage: primes_sieve(limit) and returns: primes