def normalize_bbox(bbox):
  """Normalizes bounding box: sets minimal coords for first point and maximal
  for second point. Returns new bounding box.

  :type bbox: list
  :param bbox: bounding box

  :rtype: list
  :return: new bounding box
  """
  x0, y0, x1, y1 = bbox
  return [min(x0, x1), min(y0, y1), max(x0, x1), max(y0, y1)]