def infer_target_level(data_frame):
    """
    Read the input file to infer target type and select appropriate
    summarization class.
    """

    def inference(headers):
        """Determine target level based on input headers."""
        if 'TRANSCRIPT_CLUSTER' in headers:
            return 'TRANSCRIPT_CLUSTER'
        elif 'PROBESET' in headers:
            return 'PROBESET'
        else:
            raise KeyError('Bad Input, no valid headers found.')

    headers = [_.upper() for _ in data_frame.columns]
    target = inference(headers)
    return target