public static function delete_instance_data(\context $context, int $itemid = null) {
        if (is_null($itemid)) {
            self::delete_data_for_instances($context);
        } else {
            self::delete_data_for_instances($context, [$itemid]);
        }
    }
public static function delete_instance_data(\context $context, int $itemid = null) {
        if (is_null($itemid)) {
            self::delete_data_for_instances($context);
        } else {
            self::delete_data_for_instances($context, [$itemid]);
        }
    }
public static function delete_instance_data ( \ context $ context , int $ itemid = null ) { if ( is_null ( $ itemid ) ) { self :: delete_data_for_instances ( $ context ) ; } else { self :: delete_data_for_instances ( $ context , [ $ itemid ] ) ; } }
Deletes all user data related to a context and possibly an itemid.

@param  \context $context The context to delete on.
@param  int|null $itemid  An optional item ID to refine the deletion.
Deletes all user data related to a context and possibly an itemid .