code: def _init_redis(redis_spec):
          
          if not redis_spec:
              return
          if isinstance(redis_spec, six.string_types):
              return redis.StrictRedis.from_url(redis_spec)
          # assume any other value is a valid instance
          return redis_spec
docs: Return a StrictRedis instance or None based on redis_spec.
  
          redis_spec may be None, a Redis URL, or a StrictRedis instance