<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _ctypes_splice(parameter):
 """Returns a list of variable names that define the size of each dimension. """

    params = parameter.ctypes_parameter()
    if parameter.direction == "(inout)" and ("allocatable" in parameter.modifiers or
                                             "pointer" in parameter.modifiers):
        return ', '.join(params[1:-1])
    else:
        return ', '.join(params[1::])