def METHOD_NAME(*args: Union[int, Sequence[int], Tuple[int, int]]) -> int:
    """@brief Returns a mask with specified bit ranges set.
    An integer mask is generated based on the bits and bit ranges specified by the
    arguments. Any number of arguments can be provided. Each argument may be either
    a 2-tuple of integers, a list of integers, or an individual integer. The result
    is the combination of masks produced by the arguments.
    - 2-tuple: The tuple is a bit range with the first element being the MSB and the
          second element the LSB. All bits from LSB up to and included MSB are set.
    - list: Each bit position specified by the list elements is set.
    - int: The specified bit position is set.
    @return An integer mask value computed from the logical OR'ing of masks generated
      by each argument.
    Example:
    @code
      >>> hex(bitmask((23,17),1))
      0xfe0002
      >>> hex(bitmask([4,0,2],(31,24))
      0xff000015
    @endcode
    """
    mask = 0
    for a in args:
        if isinstance(a, tuple):
            hi, lo = a
            mask |= ((1 << (hi - lo + 1)) - 1) << lo
        elif isinstance(a, (list, set)):
            mask |= reduce(operator.or_, ((1 << b) for b in a))
        elif isinstance(a, int):
            mask |= 1 << a
    return mask