Are Cutout and Crop bugged?

When I add
xtra_tfms= [cutout(n_holes=1, length=40), crop()]
tfms = get_transforms(flip_vert=True, xtra_tfms=xtra_tfms)
data = data.transform(tfms)

Then It generates bugs:
_crop() missing 1 required positional argument: ‘size’
After adding size to keyword it generates problems with padding (which shouldn’t occur but is an effect from apply_tfms from vision I think (96line). It adds padding_mode which occurs in crop_pad ). If I am using autoenoder does it really matters if I use crop or crop_pad- will there be any padding anyway?

  1. Cutout (fastai/vision/
    122 def _cutout(x, n_holes:uniform_int=1, length:uniform_int=40):
    123 “Cut out n_holes number of square holes of size length in image at random locations.”
    124 h,w = x.shape[1:]
    125 for n in range(n_holes):
    126 h_y = np.random.randint(0, h)
    127 h_x = np.random.randint(0, w)
    128 y1 = int(np.clip(h_y - length / 2, 0, h))
    129 y2 = int(np.clip(h_y + length / 2, 0, h))
    130 x1 = int(np.clip(h_x - length / 2, 0, w))
    131 x2 = int(np.clip(h_x + length / 2, 0, w))
    132 x[:, y1:y2, x1:x2] = 0
    133 return x

RandTransform(tfm=TfmPixel (cutout), kwargs={‘n_holes’: 1, ‘length’: 40}, p=1.0, resolved={}, do_run=True, is_random=True, use_on_y=True)
The problem is that in the docs and source the default parameters are like those above but n_holes and ‘length’ are uniform_int and require 2 parameters. ‘n_holes’: (1,1), ‘length’: (1,40) solves the problem- maybe it would be better to change type of those parameters?
n_holes shouldn’t be constructed as (1,n) where n is the maximum number of holes (it is randomized so can be less)?
As I understand n_holes can generate up to n holes of square size (randomly from 1 to 40 after applying changes) Can it create rectangle holes?
Wouldn’t it be better to change length input parameter to int maxlength and add new line at 126?:
length = uniform_int(1,_maxlength)