def METHOD_NAME(
        repo: 'Repo',
        sequence: Sequence,
        p: Optional[int],
        start: Optional[int],
        stop: Optional[int],
        sample_seed: str) -> Dict:
    data = {
        'name': sequence.name,
        'context': sequence.context,
        'container': {
            'hash': sequence._container_hash
        },
        'sequence_type': sequence.get_typename(),
        'sequence_full_type': sequence.get_full_typename(),
        'item_type': sequence.type,
        'axis_names': sequence.axis_names,
        'range': (sequence.start, sequence.stop),
        'axis': {},
        'steps': [],
        'values': [],
    }
    if p is None and start is None and stop is None:
        steps_list = list(sequence.steps())
        data['steps'] = steps_list
        data['values'] = _process_sequence_values(repo, list(
            sequence.values()), steps_list, sequence)
        for axis_name in sequence.axis_names:
            data['axis'][axis_name] = list(sequence.axis(axis_name))
    else:
        random.seed(sample_seed)  # use the query API qparams as sample seed
        try:
            steps, value_dicts = list(zip(*sequence[start:stop].sample(p)))
            value_lists = {k: [d[k] for d in value_dicts]
                           for k in value_dicts[0]}
            data['steps'] = steps
            data['values'] = _process_sequence_values(
                repo, value_lists.pop('val'), steps, sequence)
            data['axis'] = value_lists
        except Exception:
            pass
    return data