code: def _generate_tzoffsets(limited):
      def _mkoffset(hmtuple, fmt):
          h, m = hmtuple
          m_td = (-1 if h < 0 else 1) * m
  
          tzo = tz.tzoffset(None, timedelta(hours=h, minutes=m_td))
          return tzo, fmt.format(h, m)
  
      out = []
      if not limited:
          # The subset that's just hours
          hm_out_h = [(h, 0) for h in (-23, -5, 0, 5, 23)]
          out.extend([_mkoffset(hm, "{:+03d}") for hm in hm_out_h])
  
          # Ones that have hours and minutes
          hm_out = [] + hm_out_h
          hm_out += [(-12, 15), (11, 30), (10, 2), (5, 15), (-5, 30)]
      else:
          hm_out = [(-5, -0)]
  
      fmts = ["{:+03d}:{:02d}", "{:+03d}{:02d}"]
      out += [_mkoffset(hm, fmt) for hm in hm_out for fmt in fmts]
  
      # Also add in UTC and naive
      out.append((UTC, "Z"))
      out.append((None, ""))
  
      return out
  
imports: from __future__ import unicode_literals
  from datetime import datetime, timedelta, date, time
  import itertools
  from dateutil import tz
  from dateutil.tz import UTC
  from dateutil.parser import isoparser, isoparse
  import pytest
  import six
label_desc: Use image node_id 1 for calling a global function with example usage: _generate_tzoffsets(limited) and returns: out, tzo,  fmt