import re


def get_skip_report_step_by_index(skip_report_list):
    """Parse the missed step from skip a report.

    Based on the index within the skip report file (each line a report), the
    missed step for this entry gets extracted. In case no step could be found,
    the whole entry could not been parsed or no report for this index exists,
    the step is 'None'.
    """

    def extract_step(index):
        skip_report_entry = (
            skip_report_list[index] if index < len(skip_report_list) else ""
        )
        step_findings = re.findall(
            "^([0-9]+),0x[0-9,a-f]+,[0-9,-]+ [0-9,:]+$", skip_report_entry.strip()
        )
        step = int(step_findings[0]) if len(step_findings) == 1 else None
        return step

    return extract_step