'Binding for a `BucketingModule` means setting up the buckets and binding the
executor for the default bucket key. Executors corresponding to other keys are
bound afterwards with `switch_bucket`.
Parameters
data_shapes : list of (str, tuple)
This should correspond to the symbol for the default bucket.
label_shapes : list of (str, tuple)
This should correspond to the symbol for the default bucket.
for_training : bool
Default is ``True``.
inputs_need_grad : bool
Default is ``False``.
force_rebind : bool
Default is ``False``.
shared_module : BucketingModule
Default is ``None``. This value is currently not used.
grad_req : str, list of str, dict of str to str
Requirement for gradient accumulation. Can be \'write\', \'add\', or \'null\'
(default to \'write\').
Can be specified globally (str) or for each argument (list, dict).
bucket_key : str (or any python object)
bucket key for binding. by default use the default_bucket_key'

def bind(self, data_shapes, label_shapes=None, for_training=True, inputs_need_grad=False, force_rebind=False, shared_module=None, grad_req='write'):

    if self.params_initialized:
        (arg_params, aux_params) = self.get_params()
    if force_rebind:
        self._reset_bind()
    if self.binded:
        self.logger.warning('Already    bound,    ignoring    bind()')
        return
    assert (shared_module is None), 'shared_module    for    BucketingModule    is    not    supported'
    self.for_training = for_training
    self.inputs_need_grad = inputs_need_grad
    self.binded = True
    (symbol, data_names, label_names) = self._sym_gen(self._default_bucket_key)
    module = Module(symbol, data_names, label_names, logger=self.logger, context=self._context, work_load_list=self._work_load_list, fixed_param_names=self._fixed_param_names, state_names=self._state_names)
    module.bind(data_shapes, label_shapes, for_training, inputs_need_grad, force_rebind=False, shared_module=None, grad_req=grad_req)
    self._curr_module = module
    self._curr_bucket_key = self._default_bucket_key
    self._buckets[self._default_bucket_key] = module
    if self.params_initialized:
        self.set_params(arg_params, aux_params)
