original_string: 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]);
          }
      }
code: 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]);
          }
      }
code_tokens: 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 ] ) ; } }
docstring: 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.
docstring_tokens: Deletes all user data related to a context and possibly an itemid .