code: def DataIterator(data, checklines=10, transform=None,
                   force_dialect_check=False, from_string=False, **kwargs):
      
  
      _kwargs = dict(data=data, checklines=checklines, transform=transform,
                     force_dialect_check=force_dialect_check, **kwargs)
      if isinstance(data, six.string_types):
          if from_string:
              return _StringIterator(**_kwargs)
          else:
              if os.path.exists(data):
                  return _FileIterator(**_kwargs)
              elif is_url(data):
                  return _UrlIterator(**_kwargs)
      elif isinstance(data, FeatureDB):
          _kwargs['data'] = data.all_features()
          return _FeatureIterator(**_kwargs)
  
      else:
          return _FeatureIterator(**_kwargs)
docs: Iterate over features, no matter how they are provided.
  
      Parameters
      ----------
      data : str, iterable of Feature objs, FeatureDB
          `data` can be a string (filename, URL, or contents of a file, if
          from_string=True), any arbitrary iterable of features, or a FeatureDB
          (in which case its all_features() method will be called).
  
      checklines : int
          Number of lines to check in order to infer a dialect.
  
      transform : None or callable
          If not None, `transform` should accept a Feature object as its only
          argument and return either a (possibly modified) Feature object or
          a value that evaluates to False.  If the return value is False, the
          feature will be skipped.
  
      force_dialect_check : bool
          If True, check the dialect of every feature.  Thorough, but can be
          slow.
  
      from_string : bool
          If True, `data` should be interpreted as the contents of a file rather
          than the filename itself.
  
      dialect : None or dict
          Provide the dialect, which will override auto-detected dialects.  If
          provided, you should probably also use `force_dialect_check=False` and
          `checklines=0` but this is not enforced.