<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_pfull_from_phalf(arr, pfull_coord):
 """Compute data at full pressure levels from values at half levels."""

    phalf_top = arr.isel(**{internal_names.PHALF_STR: slice(1, None)})
    phalf_top = replace_coord(phalf_top, internal_names.PHALF_STR,
                              internal_names.PFULL_STR, pfull_coord)

    phalf_bot = arr.isel(**{internal_names.PHALF_STR: slice(None, -1)})
    phalf_bot = replace_coord(phalf_bot, internal_names.PHALF_STR,
                              internal_names.PFULL_STR, pfull_coord)
    return 0.5*(phalf_bot + phalf_top)