def METHOD_NAME(self, provider, provider_id):  
    """Update a housing program service provider
    :param provider: provider to create. 
    :type provider: ServiceProvider
    :param provider_id: The ID of the service provider to read, update or delete
    :type provider_id: int
    :rtype: ServiceProviderWithId
    """
    result = None
    session = self._get_session()
    query = session.query(
            db.HousingProgramServiceProvider).filter(
                db.HousingProgramServiceProvider.id == provider_id)
    if query.first() != None:
        query.update(provider)
        session.commit()
        provider["id"] = provider_id
        result = ServiceProviderWithId.from_dict(provider)
    session.close()
    return result