def calculate_bootstrap(bootstrap_size, length):
	"""
	Calculate the bootstrap size for the data of given length.

	Parameters
	----------
	bootstrap_size : int, float, default=None
		Bootstrap size for training. Must be one of:
		 - int : Use `bootstrap_size`.
		 - float : Use `bootstrap_size * n_samples`.
		 - None : Use `n_samples`.

	length : int
		Length of the data to be bootstrapped.

	Returns
	-------
	bootstrap : int
		Actual bootstrap size.
	"""
	if bootstrap_size is None:
		return length
	elif isinstance(bootstrap_size, int) and bootstrap_size > 0:
		return bootstrap_size
	elif isinstance(bootstrap_size, float) and 0 < bootstrap_size <= 1:
		return int(bootstrap_size * length)
	else : raise ValueError("Bootstrap Size must be None, a positive int or float in (0,1]")