old_contents: def create_token(token):
      pass
  
  def validate_token(token):
      pass
  
new_contents: import os
  from datetime import datetime, timedelta
  
  import jwt
  
  secret = os.getenv("jwt_token_secret")
  
  
  class JWT:
      @classmethod
      def create_token(cls, user_id):
          utcnow = datetime.utcnow()
          user_data = {
              'user_id': user_id,
              'iat': utcnow,
              'exp': utcnow + timedelta(seconds=int(36000)),
          }
          return jwt.encode(user_data,
                            secret,
                            algorithm='HS256').decode('utf-8')
  
      @classmethod
      def decode_token(cls, token):
          try:
              user = jwt.decode(token, secret)
              return user['user_id']
          except jwt.exceptions.InvalidTokenError:
              return "Token has expired, please login again"
  
subject: Add JWT class to handle encoding and decoding of user tokens