def METHOD_NAME(string, file_contents):
    """Steps through each scan region searching for a mephysto parameter that
    matches the requested string. Returns an array filled with the results for
    all scans that have a match. If a scan does not have a parameter matching
    the request then np.nan is returned.
    """
    scan_index = find_scan_index(file_contents)
    # Format the input string for use in a regex search
    string_test = re.escape(string)
    result = []
    # Loop over each scan index searching for requested parameter
    for index in scan_index:
        # See if any parameters match within this scan
        match = np.array(
            [
                re.match(r"^\t\t" + string_test + "=(.*)$", item) is not None
                for item in file_contents[index]
            ]
        )
        # If there is a single match then return the result
        if np.sum(match) == 1:
            relevant_line = file_contents[index][match][0]
            # Return the value that is after the equal sign
            # Example -- https://regex101.com/r/lR4pS2/7
            result.append(
                re.search(r"^\t\t" + string_test + "=(.*)$", relevant_line).group(1)
            )
        # If there is no matches return np.nan
        elif np.sum(match) == 0:
            result.append(np.nan)
        # If there is more than one match raise an error
        else:
            raise ValueError("More than one item has this label")
    return np.array(result)