<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def get_address(name, hash, db, target=None):
        '''
        fetches the contract address of deployment

        :param hash: the contract file hash
        :return: (string) address of the contract
                 error, if any
        '''

        key = DB.pkey([EZO.DEPLOYED, name, target, hash])

        d, err = db.get(key)
        if err:
            return None, err
        if not d:
            return None, None
        return d['address'].lower(), None