<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compute_key(cli, familly, discriminant=None):
 """This function is used to compute a unique key from all connection parametters."""

    hash_key = hashlib.sha256()
    hash_key.update(familly)
    hash_key.update(cli.host)
    hash_key.update(cli.user)
    hash_key.update(cli.password)
    if discriminant:
        if isinstance(discriminant, list):
            for i in discriminant:
                if i is not None and i is not False:
                    hash_key.update(str(i))
        elif isinstance(discriminant, tuple):
            for i in discriminant:
                if i is not None and i is not False:
                    hash_key.update(str(i))
        else:
            hash_key.update(discriminant)
    hash_key = hash_key.hexdigest()
    cli.log.debug("hash_key: " + hash_key)
    return hash_key