<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_instances( deployment_name='', cloud_name='EC2 us-east-1', view='tiny', ):
 """ Returns a list of instances from your account. :param str deployment_name: If provided, only lists servers in the specified deployment. :param str cloud_name: The friendly name for a RightScale-supported cloud. :param str view: The level of detail to request of RightScale. Valid values are ``default``, ``extended``, ``full``, ``full_inputs_2_0``, ``tiny``. Defaults to ``tiny``. """

    api = get_api()
    cloud = find_by_name(api.clouds, cloud_name)
    filters = ['state==operational']
    if deployment_name:
        deploy = find_by_name(api.deployments, deployment_name)
        filters.append('deployment_href==' + deploy.href)
    params = {'filter[]': filters, 'view': view}
    return cloud.instances.index(params=params)