def lyap_r_len(**kwargs):
    """
  Helper function that calculates the minimum number of data points required
  to use lyap_r.

  Note that none of the required parameters may be set to None.

  Kwargs:
    kwargs(dict):
      arguments used for lyap_r (required: emb_dim, lag, trajectory_len and
      min_tsep)

  Returns:
    minimum number of data points required to call lyap_r with the given
    parameters
  """
    min_len = (kwargs['emb_dim'] - 1) * kwargs['lag'] + 1
    min_len += kwargs['trajectory_len'] - 1
    min_len += kwargs['min_tsep'] * 2 + 1
    return min_len
