<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _shape_union(shapes):
 """A shape containing the union of all dimensions in the input shapes. Args: shapes: a list of Shapes Returns: a Shape """

  return Shape(sorted(list(set(sum([s.dims for s in shapes], [])))))