code: def test_average_keepdims_noaxis(self, xp, dtype, returned):
      a = testing.shaped_random((2, 3), xp, dtype)
      w = testing.shaped_random((2, 3), xp, dtype)
      return xp.average(a, weights=w, returned=returned, keepdims=True)
  
imports: import math
  import numpy
  import pytest
  import cupy
  from cupy import testing
label_desc: Use image node_id 6 for calling the TestAverage obj's underlying member method code with example usage: obj.test_average_keepdims_noaxis(xp, dtype, returned) and returns: xp