def METHOD_NAME(self, project_id):
    """Gets all CloudSQL instances for a project.
    Args:
        project_id (int): The project id for a GCP project.
    Returns:
        list: A list of database Instance resource dicts for a project_id.
        https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/instances
        [{"kind": "sql#instance", "name": "sql_instance1", ...}
         {"kind": "sql#instance", "name": "sql_instance2", ...},
         {...}]
    Raises:
        ApiExecutionError: ApiExecutionError is raised if the call to the
            GCP ClodSQL API fails
    """
    try:
        paged_results = self.repository.instances.list(project_id)
        flattened_results = api_helpers.flatten_list_results(
            paged_results, 'items')
        LOGGER.debug('Getting all the cloudsql instances of a project,'
                     ' project_id = %s, flattened_results = %s',
                     project_id, flattened_results)
        return flattened_results
    except (errors.HttpError, HttpLib2Error) as e:
        api_exception = api_errors.ApiExecutionError(
            'instances', e, 'project_id', project_id)
        LOGGER.exception(api_exception)
        raise api_exception