code: def _get_dependencies(sql):
      
      dependencies = []
      for (_, placeholder, dollar, _) in SqlStatement._get_tokens(sql):
        if placeholder:
          variable = placeholder[1:]
          if variable not in dependencies:
            dependencies.append(variable)
        elif dollar:
          raise Exception('Invalid sql; $ with no following $ or identifier: %s.' % sql)
      return dependencies
docs: Return the list of variables referenced in this SQL.