def METHOD_NAME(domain, doc_type, startdate, enddate):
    datefilter = None
    if startdate or enddate:
        datefilter = es.forms.submitted(gte=startdate, lt=enddate)
    return _get_es_doc_ids(es.FormES, domain, doc_type, datefilter)