def monitor_lines(recorder=None, focus_on=None):
    """ Factory function that returns a basic line monitor.

    Parameters
    ----------
    recorder : AbstractRecorder
        The recorder to use and store the records. Default is outout to screen.

    focus_on : list
        The list of function where to focus monitoring.

    """
    if recorder is None:
        recorder = screen()
    if focus_on is None:
        try:
            from pikos.cymonitors.api import LineMonitor
        except __HOLE__:
            from pikos.monitors.api import LineMonitor
            warnings.warn(
                'Cython monitors are not available '
                'falling back to pure python')
        monitor = LineMonitor(recorder)
    else:
        from pikos.monitors.focused_line_monitor import FocusedLineMonitor
        monitor = FocusedLineMonitor(recorder, functions=focus_on)
    return MonitorAttach(monitor)
dataset/ETHPy150Open enthought/pikos/pikos/api.py/monitor_lines