def METHOD_NAME(self, num_bytes: float) -> tuple[float, str]:
    """Converts the number of bytes to the correct unit"""
    num_bytes *= self.byte_multiplier
    if self.prefix is None:
        if num_bytes > 0:
            power = int(log(num_bytes) / log(self.factor))
            power = min(power, len(self.units) - 1)
        else:
            power = 0
    else:
        power = self.allowed_prefixes.index(self.prefix)
    converted_bytes = num_bytes / self.factor**power
    unit = self.units[power]
    return converted_bytes, unit