code: def _as_two_dim(x):
      if x.ndim == 2:
          return x
      return x.reshape((len(x), -1))
  
file_path: chainer/tests/chainer_tests/functions_tests/math_tests/test_batch_l2_norm_squared.py
imports: import unittest
  import numpy
  import six
  import chainer
  from chainer import functions
  from chainer import testing
  from chainer.utils import type_check
label_desc: Use image node_id 1 for calling a global function with example usage: _as_two_dim(x) and returns: x, x