add pytest function snippet