def METHOD_NAME(virsh_func, func_args, params, test):
    """
    The common test steps shared by test cases
    :param virsh_func: virsh function to be invoked
    :param func_args: str, parameter value for virsh function
    :param params: dict, test parameters
    :param test:  test object
    :raises: test.fail if size or birth was not changed
    """
    vm_name = params.get("main_vm", "avocado-vt-vm1")
    test.log.debug("Step 1: Get the invalid nvram file size and birth ")
    old_size, old_birth = get_size_birth_from_nvram(vm_name, test)
    test.log.debug("Step 2: Operate on the vm and check expected result")
    ret = virsh_func(func_args)
    err_msg = params.get('err_msg')
    libvirt.check_result(ret, expected_fails=err_msg)
    test.log.debug("Step 3: Operate on the vm again but with --reset-nvram option")
    ret = virsh_func(func_args, options=params.get('option'))
    libvirt.check_exit_status(ret)
    test.log.debug("Step 4: Verify the valid nvram file was recreated")
    new_size, new_birth = get_size_birth_from_nvram(vm_name, test)
    if (new_size == old_size or new_birth == old_birth):
        test.fail("New nvram file with size '{}' birth '{}' "
                  "should not be equal to old ones".format(new_size,
                                                           new_birth))