code: def xqrs_detect(sig, fs, sampfrom=0, sampto='end', conf=None,
                  learn=True, verbose=True):
      
      xqrs = XQRS(sig=sig, fs=fs, conf=conf)
      xqrs.detect(sampfrom=sampfrom, sampto=sampto, verbose=verbose)
      return xqrs.qrs_inds
docs: Run the 'xqrs' qrs detection algorithm on a signal. See the
      docstring of the XQRS class for algorithm details.
  
      Parameters
      ----------
      sig : numpy array
          The input ecg signal to apply the qrs detection on.
      fs : int or float
          The sampling frequency of the input signal.
      sampfrom : int, optional
          The starting sample number to run the detection on.
      sampto :
          The final sample number to run the detection on. Set as 'end' to
          run on the entire signal.
      conf : XQRS.Conf object, optional
          The configuration object specifying signal configuration
          parameters. See the docstring of the XQRS.Conf class.
      learn : bool, optional
          Whether to apply learning on the signal before running the main
          detection. If learning fails or is not conducted, the default
          configuration parameters will be used to initialize these
          variables.
      verbose : bool, optional
          Whether to display the stages and outcomes of the detection
          process.
  
      Returns
      -------
      qrs_inds : numpy array
          The indices of the detected qrs complexes
  
      Examples
      --------
      >>> import wfdb
      >>> from wfdb import processing
  
      >>> sig, fields = wfdb.rdsamp('sample-data/100', channels=[0])
      >>> qrs_inds = processing.xqrs_detect(sig=sig[:,0], fs=fields['fs'])