def __call__(self, max_lengths, min_lengths, num_buckets):
if not isinstance(max_lengths, INT_TYPES):<EOL><INDENT>alpha_l = [<NUM_LIT:2> * float(max_len - min_len - num_buckets)<EOL>/ (num_buckets * (num_buckets + <NUM_LIT:1>))<EOL>for max_len, min_len in<EOL>zip(max_lengths, min_lengths)]<EOL>bucket_keys =[tuple(int(round(min_len + alpha * (((i + <NUM_LIT:1>) * (i + <NUM_LIT:2>)) / <NUM_LIT:2>) + i + <NUM_LIT:1>))<EOL>for min_len, alpha in zip(min_lengths, alpha_l))<EOL>for i in range(num_buckets)]<EOL>bucket_keys[-<NUM_LIT:1>] = tuple(max(max_bucket_key, max_len)<EOL>for max_bucket_key, max_len<EOL>in zip(bucket_keys[-<NUM_LIT:1>], max_lengths))<EOL><DEDENT>else:<EOL><INDENT>alpha = <NUM_LIT:2> * float(max_lengths - min_lengths - num_buckets)/ (num_buckets * (num_buckets + <NUM_LIT:1>))<EOL>bucket_keys = [int(round(min_lengths + alpha * (((i + <NUM_LIT:1>) * (i + <NUM_LIT:2>)) / <NUM_LIT:2>) + i + <NUM_LIT:1>))<EOL>for i in range(num_buckets)]<EOL>bucket_keys[-<NUM_LIT:1>] = max(bucket_keys[-<NUM_LIT:1>], max_lengths)<EOL><DEDENT>return bucket_keys<EOL>
r"""This function generates bucket keys with linearly increasing bucket width:

        Parameters
        ----------
        max_lengths : int of list of int
            Maximum of lengths of sequences.
        min_lengths : int of list of int
            Minimum of lengths of sequences.
        num_buckets : int
            Number of buckets

        Returns
        -------
        bucket_keys : list of int
            A list including the keys of the buckets.