code: def _should_defer(input_layer, args, kwargs):
    
    for arg in itertools.chain([input_layer], args, six.itervalues(kwargs)):
      if isinstance(arg, (_DeferredLayer, UnboundVariable)):
        return True
      elif (isinstance(arg, collections.Sequence) and
            not isinstance(arg, six.string_types)):
        if _should_defer(None, arg, {}):
          return True
      elif isinstance(arg, collections.Mapping):
        if _should_defer(None, (), arg):
          return True
    return False
docs: Checks to see if any of the args are templates.