def METHOD_NAME(bg_path, shape):
    bg = paddle.zeros((1, 3, shape[0], shape[1]))
    # special color
    if bg_path == 'r':
        bg[:, 2, :, :] = 1
    elif bg_path == 'g':
        bg[:, 1, :, :] = 1
    elif bg_path == 'b':
        bg[:, 0, :, :] = 1
    elif bg_path == 'w':
        bg = bg + 1
    elif not os.path.exists(bg_path):
        raise Exception('The background path is not found: {}'.format(bg_path))
    # image
    elif bg_path.endswith(
        ('.JPEG', '.jpeg', '.JPG', '.jpg', '.BMP', '.bmp', '.PNG', '.png')):
        bg = cv2.imread(bg_path)
        bg = bg[np.newaxis, :, :, :]
        bg = paddle.to_tensor(bg) / 255.
        bg = bg.transpose((0, 3, 1, 2))
    elif bg_path.lower().endswith(
        ('.mp4', '.avi', '.mov', '.m4v', '.dat', '.rm', '.rmvb', '.wmv', '.asf',
         '.asx', '.3gp', '.mkv', '.flv', '.vob')):
        transforms = T.Compose([T.Normalize(mean=(0, 0, 0), std=(1, 1, 1))])
        bg = VideoReader(bg_path, transforms=transforms)
        bg = paddle.io.DataLoader(bg)
        bg = iter(bg)
    else:
        raise IOError('The background path is invalid, please check it')
    return bg