def __call__(self, max_lengths, min_lengths, num_buckets):
if not isinstance(max_lengths, INT_TYPES):<EOL><INDENT>initial_width_l = [<EOL>(max_len - min_len) * (self.bucket_len_step - <NUM_LIT:1>)<EOL>/ (math.pow(self.bucket_len_step, num_buckets) - <NUM_LIT:1>)<EOL>for max_len, min_len in<EOL>zip(max_lengths, min_lengths)]<EOL>bucket_keys =[tuple(<EOL>int(round(min_len + initial_width * (math.pow(self.bucket_len_step, i + <NUM_LIT:1>) - <NUM_LIT:1>)<EOL>/ (self.bucket_len_step - <NUM_LIT:1>)))<EOL>for min_len, initial_width in zip(min_lengths, initial_width_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>initial_width = (max_lengths - min_lengths) * (self.bucket_len_step - <NUM_LIT:1>)/ (math.pow(self.bucket_len_step, num_buckets) - <NUM_LIT:1>)<EOL>bucket_keys = [<EOL>int(round(min_lengths + initial_width * (math.pow(self.bucket_len_step, i + <NUM_LIT:1>) - <NUM_LIT:1>)<EOL>/ (self.bucket_len_step - <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 exponentially 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.