code: def get_thumbnailer(obj, relative_name=None):
      
      if hasattr(obj, 'easy_thumbnails_thumbnailer'):
          return obj.easy_thumbnails_thumbnailer
      if isinstance(obj, Thumbnailer):
          return obj
      elif isinstance(obj, FieldFile):
          if not relative_name:
              relative_name = obj.name
          return ThumbnailerFieldFile(obj.instance, obj.field, relative_name)
  
      source_storage = None
  
      if isinstance(obj, six.string_types):
          relative_name = obj
          obj = None
  
      if not relative_name:
          raise ValueError(
              "If object is not a FieldFile or Thumbnailer instance, the "
              "relative name must be provided")
  
      if isinstance(obj, File):
          obj = obj.file
      if isinstance(obj, Storage) or obj == default_storage:
          source_storage = obj
          obj = None
  
      return Thumbnailer(
          file=obj, name=relative_name, source_storage=source_storage,
          remote_source=obj is not None)
docs: Get a :class:`Thumbnailer` for a source file.
  
      The ``obj`` argument is usually either one of the following:
  
          * ``FieldFile`` instance (i.e. a model instance file/image field
            property).
  
          * A string, which will be used as the relative name (the source will be
            set to the default storage).
  
          * ``Storage`` instance - the ``relative_name`` argument must also be
            provided.
  
      Or it could be:
  
          * A file-like instance - the ``relative_name`` argument must also be
            provided.
  
            In this case, the thumbnailer won't use or create a cached reference
            to the thumbnail (i.e. a new thumbnail will be created for every
            :meth:`Thumbnailer.get_thumbnail` call).
  
      If ``obj`` is a ``Thumbnailer`` instance, it will just be returned. If it's
      an object with an ``easy_thumbnails_thumbnailer`` then the attribute is
      simply returned under the assumption it is a Thumbnailer instance)