Allowed values callback.
function options_test_allowed_values_callback($field, $instance, $entity_type, $entity) {
$values = array(
'Group 1' => array(
0 => 'Zero',
),
1 => 'One',
'Group 2' => array(
2 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>',
),
);
return $values;
}