docstr: Raises error if they don't belong sqlconnector or have different credentials
  Args:
      dfs (List[SmartDataframe]): list of SmartDataframes
  
  Raises:
      InvalidConfigError: Raise Error in case of config is set but criteria is not met
docstr_tok: ["Raises","error","if","they","do","n't","belong","sqlconnector","or","have","different","credentials","Args",":","dfs","(","List","[","SmartDataframe","]",")",":","list","of","SmartDataframes","Raises",":","InvalidConfigError",":","Raise","Error","in","case","of","config","is","set","but","criteria","is","not","met"]
code: def _validate_direct_sql(self, dfs: List) -> bool:
      """
      Raises error if they don't belong sqlconnector or have different credentials
      Args:
          dfs (List[SmartDataframe]): list of SmartDataframes
  
      Raises:
          InvalidConfigError: Raise Error in case of config is set but criteria is not met
      """
      if self._config.direct_sql and all(
          df.is_connector() for df in dfs
      ):
          if all(df == dfs[0] for df in dfs):
              return True
          else:
              raise InvalidConfigError(
                  "Direct requires all SQLConnector and they belong to same datasource "
                  "and have same credentials"
              )
      return False
  
imports: import re
  import ast
  import uuid
  from collections import defaultdict
  import astor
  import pandas
  from pandasai.helpers.path import find_project_root
  from pandasai.helpers.skills_manager import SkillsManager
  from pandasai.helpers.sql import extract_table_names
  from .node_visitors import AssignmentVisitor, CallVisitor
  from .save_chart import add_save_chart
  from .optional import import_dependency
  from ..exceptions import BadImportError, MaliciousQueryError, NoResultFoundError, InvalidConfigError
  from ..constants import WHITELISTED_BUILTINS, WHITELISTED_LIBRARIES
  from typing import Union, List, Generator, Any
  from ..helpers.logger import Logger
  from ..schemas.df_config import Config
  import logging
  import traceback
label_desc: Use image node_id 4 for calling the CodeManager obj's underlying member method code with example usage: obj._validate_direct_sql(dfs) and returns: False, True