<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _maybe_repeat(self, x):
 """Utility function for processing arguments that are singletons or lists. Args: x: either a list of self.n elements, or not a list. Returns: a list of self.n elements. """

    if isinstance(x, list):
      assert len(x) == self.n
      return x
    else:
      return [x] * self.n