input: Write a python function to find the largest prime number in a given range.
  assert largest_prime_in_range(3, 22) == 19
  assert largest_prime_in_range(10, 30) == 29
  assert largest_prime_in_range(50, 100) == 97
output: def largest_prime_in_range(start, end):
      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
  
      largest_prime = None
      for num in range(end, start - 1, -1):
          if is_prime(num):
              largest_prime = num
              break
      return largest_prime