<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def all_devices(cl_device_type=None, platform=None):
 """Get multiple device environments, optionally only of the indicated type. This will only fetch devices that support double point precision. Args: cl_device_type (cl.device_type.* or string):
 The type of the device we want, can be a opencl device type or a string matching 'GPU' or 'CPU'. platform (opencl platform):
 The opencl platform to select the devices from Returns: list of CLEnvironment: List with the CL device environments. """

        if isinstance(cl_device_type, str):
            cl_device_type = device_type_from_string(cl_device_type)

        runtime_list = []

        if platform is None:
            platforms = cl.get_platforms()
        else:
            platforms = [platform]

        for platform in platforms:
            if cl_device_type:
                devices = platform.get_devices(device_type=cl_device_type)
            else:
                devices = platform.get_devices()

            for device in devices:
                if device_supports_double(device):
                    env = CLEnvironment(platform, device)
                    runtime_list.append(env)

        return runtime_list