class_docstr: This handler handles connection and execution of the Scylla statements.
class_docstr_tok: ["This","handler","handles","connection","and","execution","of","the","Scylla","statements","."]
docstr: Downloads the secure bundle from a given URL and stores it in a temporary file.
  
  :param url: URL of the secure bundle to be downloaded.
  :param max_size: Maximum allowable size of the bundle in bytes. Defaults to 10MB.
  :return: Path to the downloaded secure bundle saved as a temporary file.
  :raises ValueError: If the secure bundle size exceeds the allowed `max_size`.
  
  TODO:
  - Find a way to periodically clean up or delete the temporary files 
  after they have been used to prevent filling up storage over time.
docstr_tok: ["Downloads","the","secure","bundle","from","a","given","URL","and","stores","it","in","a","temporary","file",".",":","param","url",":","URL","of","the","secure","bundle","to","be","downloaded",".",":","param","max_size",":","Maximum","allowable","size","of","the","bundle","in","bytes",".","Defaults","to","10MB",".",":","return",":","Path","to","the","downloaded","secure","bundle","saved","as","a","temporary","file",".",":","raises","ValueError",":","If","the","secure","bundle","size","exceeds","the","allowed","`","max_size","`",".","TODO",":","-","Find","a","way","to","periodically","clean","up","or","delete","the","temporary","files","after","they","have","been","used","to","prevent","filling","up","storage","over","time","."]
code: def download_secure_bundle(self, url, max_size=10 * 1024 * 1024):
      """
      Downloads the secure bundle from a given URL and stores it in a temporary file.
  
      :param url: URL of the secure bundle to be downloaded.
      :param max_size: Maximum allowable size of the bundle in bytes. Defaults to 10MB.
      :return: Path to the downloaded secure bundle saved as a temporary file.
      :raises ValueError: If the secure bundle size exceeds the allowed `max_size`.
  
      TODO:
      - Find a way to periodically clean up or delete the temporary files
      after they have been used to prevent filling up storage over time.
      """
      response = requests.get(url, stream=True, timeout=10)
      response.raise_for_status()
  
      content_length = int(response.headers.get("content-length", 0))
      if content_length > max_size:
          raise ValueError(
              "Secure bundle is larger than the allowed size!"
          )
  
      with tempfile.NamedTemporaryFile(delete=False) as temp_file:
          size_downloaded = 0
          for chunk in response.iter_content(chunk_size=8192):
              size_downloaded += len(chunk)
              if size_downloaded > max_size:
                  raise ValueError(
                      "Secure bundle is larger than the allowed size!"
                  )
              temp_file.write(chunk)
      return temp_file.name
  
imports: import os
  import tempfile
  from collections import OrderedDict
  import pandas
  import requests
  from cassandra.cluster import Cluster
  from cassandra.auth import PlainTextAuthProvider
  from cassandra.util import Date
  from mindsdb_sql import parse_sql
  from mindsdb_sql.parser.ast.base import ASTNode
  from mindsdb_sql.parser import ast
  from mindsdb_sql.render.sqlalchemy_render import SqlalchemyRender
  from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE
  from mindsdb.integrations.libs.base import DatabaseHandler
  from mindsdb.integrations.libs.response import HandlerStatusResponse, HandlerResponse, RESPONSE_TYPE
  from mindsdb.utilities import log
label_desc: Use image node_id 2 for calling the ScyllaHandler obj's underlying member method code with example usage: obj.download_secure_bundle(url, max_size) and returns: temp_file