code: def CheckAddressState(self, script_hash):
          
          for key, contract in self._contracts.items():
              if contract.ScriptHash.ToBytes() == script_hash.ToBytes():
                  return AddressState.InWallet
          for watch in self._watch_only:
              if watch == script_hash:
                  return AddressState.InWallet | AddressState.WatchOnly
          return AddressState.NoState
docs: Determine the address state of the provided script hash.
  
          Args:
              script_hash (UInt160): a script hash to determine the address state of.
  
          Returns:
              AddressState: the address state.