<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def human_binning(data=None, bin_count: Optional[int] = None, *, range=None, **kwargs) -> FixedWidthBinning: """Construct fixed-width ninning schema with bins automatically optimized to human-friendly widths. Parameters bin_count: Number of bins range: Optional[tuple] (min, max) """

    subscales = np.array([0.5, 1, 2, 2.5, 5, 10])

    # TODO: remove colliding kwargs
    if data is None and range is None:
        raise RuntimeError("Cannot guess optimum bin width without data.")
    if bin_count is None:
        bin_count = ideal_bin_count(data)
    min_ = range[0] if range else data.min()
    max_ = range[1] if range else data.max()
    bw = (max_ - min_) / bin_count

    power = np.floor(np.log10(bw)).astype(int)
    best_index = np.argmin(np.abs(np.log(subscales * (10.0 ** power) / bw)))
    bin_width = (10.0 ** power) * subscales[best_index]
    return fixed_width_binning(bin_width=bin_width, data=data, range=range, **kwargs)