def lookup_source(filename: str, lineno: int) -> str | None:
    """
    Attempt to lookup a line of source code from a given filename at a given
    line number.

    Args:
        filename (str):
            The name of the file to attempt to open
        lineno (int):
            The line number of the line in the file to return

    Returns:
        A stripped string containing the requested source code line, if it
        can be found, otherwise None.

    """
    try:
        with open(filename, "r") as f:
            lines = f.readlines()
            if 1 <= lineno <= len(lines):
                return lines[lineno - 1].strip()
    except Exception:
        return None
    return None

    Attempt to lookup a line of source code from a given filename at a given
    line number.

    Args:
        filename (str):
            The name of the file to attempt to open
        lineno (int):
            The line number of the line in the file to return

    Returns:
        A stripped string containing the requested source code line, if it
        can be found, otherwise None.

    
cupynumeric/_array/doctor.py