def METHOD_NAME(args):
    if not os.path.isfile(args.inputImageFile):
        raise OSError('Input image file does not exist.')
    if len(args.reference_mu_lab) != 3:
        raise ValueError('Reference Mean LAB should be a 3 element vector.')
    if len(args.reference_std_lab) != 3:
        raise ValueError('Reference Stddev LAB should be a 3 element vector.')
    if len(args.analysis_roi) != 4:
        raise ValueError('Analysis ROI must be a vector of 4 elements.')
    if os.path.splitext(args.outputNucleiFeatureFile)[1] not in ['.csv', '.h5']:
        raise ValueError('Extension of output feature file must be .csv or .h5')