<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def disk_param(name, size, snapshot_profile, cmdline=None, kernel=None):
 """ Return disk parameter structure. """

        disk_params = {}

        if cmdline:
            disk_params['cmdline'] = cmdline

        if kernel:
            disk_params['kernel'] = kernel

        if name:
            disk_params['name'] = name

        if snapshot_profile is not None:
            disk_params['snapshot_profile'] = snapshot_profile

        if size:
            disk_params['size'] = size

        return disk_params