code: def expand(sql, args=None):
      
      sql, args = SqlModule.get_sql_statement_with_environment(sql, args)
      return _sql_statement.SqlStatement.format(sql._sql, args)
docs: Expand a SqlStatement, query string or SqlModule with a set of arguments.
  
      Args:
        sql: a SqlStatement, %%sql module, or string containing a query.
        args: a string of command line arguments or a dictionary of values. If a string, it is
            passed to the argument parser for the SqlModule associated with the SqlStatement or
            SqlModule. If a dictionary, it is used to override any default arguments from the
            argument parser. If the sql argument is a string then args must be None or a dictionary
            as in this case there is no associated argument parser.
      Returns:
        The expanded SQL, list of referenced scripts, and list of referenced external tables.