<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_contract_by_hash(self, contract_hash):
 """get mapped contract_address by its hash, if not found try indexing."""

        contract_address = self.db.reader._get_address_by_hash(contract_hash)
        if contract_address is not None:
            return contract_address

        else:
            raise AddressNotFoundError