def __mul__(self, other):
        """Multiplication: Supported operations with result types:

- bm1 * bm2 = bm1
- bm * num = bm
- num * bm = num (see rmul)
"""
        if isinstance(other, numbers.Number):
            # bm * num
            result = self._byte_value * other
            return (type(self))(bytes=result)
        else:
            # bm1 * bm2
            _other = other.value * other.base ** other.power
            _self = self.prefix_value * self._base ** self._power
            return (type(self))(bytes=_other * _self)
def __mul__ ( self , other ) : if isinstance ( other , numbers . Number ) : result = self . _byte_value * other return ( type ( self ) ) ( bytes = result ) else : _other = other . value * other . base ** other . power _self = self . prefix_value * self . _base ** self . _power return ( type ( self ) ) ( bytes = _other * _self )
Multiplication: Supported operations with result types:

- bm1 * bm2 = bm1
- bm * num = bm
- num * bm = num (see rmul)