code: def _between(p1, p2, ref):
      start1, end1 = p1(ref)
      start2, end2 = p2(ref)
      if start1 < start2:
          return start1, end2
      return start2, end1
  
imports: from datetime import datetime, date, time, timedelta
  from guild import _yacc
  from .None import trlex
label_desc: Use image node_id 47 for calling a global function with example usage: _between(p1, p2, ref) and returns: start2,  end1, start1,  end2