def _get_usage_string(fname):
    """
    Attempt to read usage string for a given AFNI command in `fname`

    The file at `fname` should be a full AFNI help text file generated by
    running `apsearch -update_all_afni_help`

    Parameters
    ----------
    fname : str
        Path to full helptext for a given AFNI command

    Returns
    -------
    usage : str
        Line detailing usage for command in `fname`
    """
    text_list = fname.read_text(errors='ignore').splitlines()
    usage_text = [val for val in text_list if
                  val.lower().strip().startswith('usage')]
    if usage_text:
        return usage_text[0]
    else:
        return None