input: Write a function to find the largest prime factor of a given number. If the number is prime, return the number itself. If the number is 1 or less, return None as there are no prime factors.
  assert largest_prime_factor(331) == 331
  assert largest_prime_factor(56) == 7
  assert largest_prime_factor(13195) == 29
  assert largest_prime_factor(1) == None
  assert largest_prime_factor(0) == None
output: def largest_prime_factor(n):
      if n <= 1:
          return None
      largest_factor = None
      for i in range(2, int(n**0.5) + 1):
          while n % i == 0:
              largest_factor = i
              n //= i
      if n > 1:
          largest_factor = n
      return largest_factor