<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def bulk_shear(pressure, u, v, heights=None, bottom=None, depth=None):
 r"""Calculate bulk shear through a layer. Layer top and bottom specified in meters or pressure. Parameters pressure : `pint.Quantity` Atmospheric pressure profile u : `pint.Quantity` U-component of wind. v : `pint.Quantity` V-component of wind. height : `pint.Quantity`, optional Heights from sounding depth: `pint.Quantity`, optional The depth of the layer in meters or hPa. Defaults to 100 hPa. bottom: `pint.Quantity`, optional The bottom of the layer in height or pressure coordinates. If using a height, it must be in the same coordinates as the given heights (i.e., don't use meters AGL unless given heights are in meters AGL.) Defaults to the highest pressure or lowest height given. Returns ------- u_shr: `pint.Quantity` u-component of layer bulk shear v_shr: `pint.Quantity` v-component of layer bulk shear """

    _, u_layer, v_layer = get_layer(pressure, u, v, heights=heights,
                                    bottom=bottom, depth=depth)

    u_shr = u_layer[-1] - u_layer[0]
    v_shr = v_layer[-1] - v_layer[0]

    return u_shr, v_shr