def xcom_pull(context, params):
    """
    For pulling data from xcom
    :param context: context passed to operator/sensor function
    :param params: <type: dict> Its structure should be like:
        {
            <task_id>: <key>,
            <task_id>: [<keys>,],
        }
    :return: <type:dict>
        {
            <task_id>:{
                          <key>: <value>,
            },
        }
    """
    data = {}
    task_instance = context['ti']
    # task_instance.xcom_pull(key='instance_info', task_ids='sync_task')
    for task_id in params.keys():
        data[task_id] = {}
        keys = params[task_id] if isinstance(params[task_id], (list, tuple)) else [params[task_id]]
        for key in keys:
            data[task_id][key] = task_instance.xcom_pull(key=key, task_ids=task_id)

    return data