def get_default_query_from_module(module):
  """ Given a %%sql module return the default (last) query for the module.

  Args:
    module: the %%sql module.

  Returns:
    The default query associated with this module.
  """
  if isinstance(module, types.ModuleType):
    return module.__dict__.get(_SQL_MODULE_LAST, None)
  return None
Given a %%sql module return the default (last) query for the module.

  Args:
    module: the %%sql module.

  Returns:
    The default query associated with this module.