def characterize_flow_parameters(sample: Union[(List[int], List[Tuple[(int, float)]])], secondary_sample: Union[(List[int], List[Tuple[(int, float)]], None)], sparse_rounds: int):
    '\n    Characterizes the primary and secondary sets and computes their hash, that can be used ot\n    match similar samples for random sampling.\n\n    :param sample: primary set\n    :param secondary_sample: secondary set\n    :param sparse_rounds: if sparse rounds are to be performed\n    :return: first set length, shape, hist, second set length, shape, hist, sparse rounds, hash\n    '
    (prim_len, prim_shape, prim_hist) = _characterize_set(sample)
    (sec_len, sec_shape, sec_hist) = _characterize_set(secondary_sample)
    _hash = hashlib.md5(json.dumps([prim_len, prim_shape, prim_hist, sec_len, sec_shape, sec_hist, sparse_rounds]).encode('utf-8')).hexdigest()
    log.debug(('hashed a flow parameters from:\n%d/%d/%s; \n%d/%d/%s; \n%d \nto %s' % (prim_len, prim_shape, prim_hist, sec_len, sec_shape, sec_hist, sparse_rounds, _hash)))
    return (prim_len, prim_shape, prim_hist, sec_len, sec_shape, sec_hist, sparse_rounds, _hash)
Characterizes the primary and secondary sets and computes their hash, that can be used ot
match similar samples for random sampling.

:param sample: primary set
:param secondary_sample: secondary set
:param sparse_rounds: if sparse rounds are to be performed
:return: first set length, shape, hist, second set length, shape, hist, sparse rounds, hash
def characterize_flow_parameters(sample: Union[(List[int], List[Tuple[(int, float)]])], secondary_sample: Union[(List[int], List[Tuple[(int, float)]], None)], sparse_rounds: int):
    '\n    Characterizes the primary and secondary sets and computes their hash, that can be used ot\n    match similar samples for random sampling.\n\n    :param sample: primary set\n    :param secondary_sample: secondary set\n    :param sparse_rounds: if sparse rounds are to be performed\n    :return: first set length, shape, hist, second set length, shape, hist, sparse rounds, hash\n    '
    (prim_len, prim_shape, prim_hist) = _characterize_set(sample)
    (sec_len, sec_shape, sec_hist) = _characterize_set(secondary_sample)
    _hash = hashlib.md5(json.dumps([prim_len, prim_shape, prim_hist, sec_len, sec_shape, sec_hist, sparse_rounds]).encode('utf-8')).hexdigest()
    log.debug(('hashed a flow parameters from:\n%d/%d/%s; \n%d/%d/%s; \n%d \nto %s' % (prim_len, prim_shape, prim_hist, sec_len, sec_shape, sec_hist, sparse_rounds, _hash)))
    return (prim_len, prim_shape, prim_hist, sec_len, sec_shape, sec_hist, sparse_rounds, _hash)