def obj_box_coord_upleft_butright_to_centroid(coord):
if len(coord) != <NUM_LIT:4>:<EOL><INDENT>raise AssertionError("<STR_LIT>")<EOL><DEDENT>x1, y1, x2, y2 = coord<EOL>w = x2 - x1<EOL>h = y2 - y1<EOL>x_c = x1 + w / <NUM_LIT><EOL>y_c = y1 + h / <NUM_LIT><EOL>return [x_c, y_c, w, h]<EOL>
Convert one coordinate [x1, y1, x2, y2] to [x_center, y_center, w, h].
    It is the reverse process of ``obj_box_coord_centroid_to_upleft_butright``.

    Parameters
    ------------
    coord : list of 4 int/float
        One coordinate.

    Returns
    -------
    list of 4 numbers
        New bounding box.