How to add this feature to generate my scan_en signal pulse is high for 2 clock pulse and then low rest of the clock pulse

how to add this feature to generate my scan_en signal pulse is high for 2 clock pulse and then low rest of the clock pulse

I find your question difficult to understand given the tags you placed on it. How does (UVM, constraint-randomization) relate to the code you are looking for?