async def METHOD_NAME(self, **kwargs):
    """Gets the database account.
    First tries by using the default endpoint, and if that doesn't work,
    use the endpoints for the preferred locations in the order they are
    specified, to get the database account.
    """
    try:
        database_account = await self._GetDatabaseAccountStub(self.DefaultEndpoint, **kwargs)
        return database_account
    # If for any reason(non-globaldb related), we are not able to get the database
    # account from the above call to GetDatabaseAccount, we would try to get this
    # information from any of the preferred locations that the user might have
    # specified (by creating a locational endpoint) and keeping eating the exception
    # until we get the database account and return None at the end, if we are not able
    # to get that info from any endpoints
    except exceptions.CosmosHttpResponseError:
        for location_name in self.PreferredLocations:
            locational_endpoint = _GlobalEndpointManager.GetLocationalEndpoint(self.DefaultEndpoint, location_name)
            try:
                database_account = await self._GetDatabaseAccountStub(locational_endpoint, **kwargs)
                return database_account
            except exceptions.CosmosHttpResponseError:
                pass
        raise