How can i get few training data examples by using a intent name?

Hello, By passing a intent name can i get few training examples from my bot nlu file

for example if i given the intent name as stop i need to display first two examples from the intent stop as shown below

version: "3.1"
nlu:

- intent: stop
  examples: |
    - i want to exit 
    - stop the survey
    - can i exit
    - please exit me from here
    - please stop questioning

You could use a custom action that reads the nlu.yml.

Could you elaborate on which class I have to use in custom action to read nlu file?