code: def iso8601interval(value, argument="argument"):
      """
      Parses ISO 8601-formatted datetime intervals into tuples of datetimes.
  
      Accepts both a single date(time) or a full interval using either start/end
      or start/duration notation, with the following behavior:
  
      - Intervals are defined as inclusive start, exclusive end
      - Single datetimes are translated into the interval spanning the
        largest resolution not specified in the input value, up to the day.
      - The smallest accepted resolution is 1 second.
      - All timezones are accepted as values; returned datetimes are
        localized to UTC. Naive inputs and date inputs will are assumed UTC.
  
      Examples::
  
          "2013-01-01" -> datetime(2013, 1, 1), datetime(2013, 1, 2)
          "2013-01-01T12" -> datetime(2013, 1, 1, 12), datetime(2013, 1, 1, 13)
          "2013-01-01/2013-02-28" -> datetime(2013, 1, 1), datetime(2013, 2, 28)
          "2013-01-01/P3D" -> datetime(2013, 1, 1), datetime(2013, 1, 4)
          "2013-01-01T12:00/PT30M" -> datetime(2013, 1, 1, 12), datetime(2013, 1, 1, 12, 30)
          "2013-01-01T06:00/2013-01-01T12:00" -> datetime(2013, 1, 1, 6), datetime(2013, 1, 1, 12)
  
      :param str value: The ISO8601 date time as a string
      :return: Two UTC datetimes, the start and the end of the specified interval
      :rtype: A tuple (datetime, datetime)
      :raises ValueError: if the interval is invalid.
      """
      if not value:
          raise ValueError(
              "Expected a valid ISO8601 date/time interval."
          )
  
      try:
          start, end = _parse_interval(value)
  
          if end is None:
              end = _expand_datetime(start, value)
  
          start, end = _normalize_interval(start, end, value)
  
      except ValueError:
          msg = "Invalid {arg}: {value}. {arg} must be a valid ISO8601 date/time interval."
          raise ValueError(msg.format(arg=argument, value=value))
  
      return start, end
  
imports: from __future__ import unicode_literals
  import re
  import socket
  from datetime import datetime, time, timedelta
  from email.utils import parsedate_tz, mktime_tz
  from six.moves.urllib.parse import urlparse
  import aniso8601
  import pytz
label_desc: Use image node_id 7 for calling a global function with example usage: iso8601interval(value, argument) and returns: start,  end