import json


def create_snippet(file_path):
    """
    Creates a snippet of the original SQuAD data.

    Args:
        file_path: path to the original file

    Returns: string containing file contents
    """
    with open(file_path) as data_file:
        data = json.load(data_file)['data']
        out = {
            'data': [{
                'title': data[0]['title'],
                'paragraphs': [{
                    'context': data[0]['paragraphs'][0]['context'],
                    'qas': data[0]['paragraphs'][0]['qas'][0:3]
                }]
            }]
        }
        return json.dumps(out, indent=2)