def _remove_volumes(bold_file, skip_vols):
    """Remove skip_vols from bold_file."""
    import nibabel as nb
    from nipype.utils.filemanip import fname_presuffix
    if skip_vols == 0:
        return bold_file
    out = fname_presuffix(bold_file, suffix='_cut')
    bold_img = nb.load(bold_file)
    bold_img.__class__(bold_img.dataobj[(...), skip_vols:], bold_img.affine,
        bold_img.header).to_filename(out)
    return out
