code: def generate_random_token(length=32):
      
      chars = (string.ascii_lowercase + string.ascii_uppercase + string.digits)
      return ''.join(random.choice(chars) for _ in range(length))
docs: Generate random secure token
  
      >>> len(generate_random_token())
      32
      >>> len(generate_random_token(6))
      6