def METHOD_NAME(ansible_module, certnick, expected):
    """
    :Title: Test tps-config-mod revoked and expired Admin, Agent and Operator Certificates
    :Description: Test tps-config-mod revoked and expired Admin, Agent and Operator Certificates
    :Requirement:
    :Setup: Use pki setup via ansible playbooks
    :Steps: 1. Run tps-config-mod using revoked and expired Admin, Agent and Operator Certificates
    :Expectedresults: 1. The command should not be able to modify configuration with revoked and expired certificates
    :Automated: Yes
    """
    tpsconfig_mod_output = ansible_module.pki(
        cli='tps-config-mod',
        extra_args='--input /tmp/tps_config.xml',
        nssdb=constants.NSSDB,
        port=constants.TPS_HTTPS_PORT,
        protocol='https',
        certnick=certnick,
    )
    for result in tpsconfig_mod_output.values():
        for iter in expected:
            assert iter in result['stderr_lines']