'Returns a django connection for a given DB Alias'

def _get_connection(self):

    if self._is_multidb():
        from django.db import connections
        return connections[self.db_alias]
    else:
        from django.db import connection
        return connection
