def METHOD_NAME(signatures):
    method_ids = [method_id_int(sig) for sig in signatures]
    n = len(signatures)
    # search a range of buckets to try to minimize bucket size
    # (doing the range search improves worst worst bucket size from 9 to 4,
    # see _bench_sparse)
    lo = max(1, math.floor(n * 0.85))
    hi = max(1, math.ceil(n * 1.15))
    stats = {}
    for i in range(lo, hi + 1):
        buckets = _mk_buckets(method_ids, i)
        stats[i] = buckets
    min_max_bucket_size = hi + 1  # smallest max_bucket_size
    # find the smallest i which gives us the smallest max_bucket_size
    for i, buckets in stats.items():
        max_bucket_size = max(len(bucket) for bucket in buckets.values())
        if max_bucket_size < min_max_bucket_size:
            min_max_bucket_size = max_bucket_size
            ret = i, buckets
    assert ret is not None
    return ret