// Get the option group ID $optionGroupId = CRM_Core_OptionGroup::getValue('my_option_group', true); // Define the options $options = array( 'Option 1', 'Option 2', 'Option 3', ); // Populate the option group with the options CRM_Core_PseudoConstant::populate($optionGroupId, $options);In this example, we first get the ID of the option group we want to populate. Then, we define an array of options that we want to add to the option group. Finally, we call CRM_Core_PseudoConstant populate function to populate the option group with the defined options. This function is part of the CiviCRM package library, which is a set of PHP classes and functions that are used to build CRM applications.