import math


def _get_entropy(pw_len: int, charsets: list) -> float:
    """
    Calculate password entropy.

    :param int pw_len: password length
    :param list charsets: available characters to use
    :return int: calculated entropy
    """
    # E = log_2(R^L), R = pool of unique char, L = password length
    chars_pool = len("".join(charsets))
    entropy = math.log(chars_pool ** pw_len, 2)
    return entropy