code: def create_hash(inp, l=10, algo="sha256"):
      
      return getattr(hashlib, algo)(six.b(str(inp))).hexdigest()[:l]
docs: Takes an input *inp* and creates a hash based on an algorithm *algo*. For valid algorithms, see
      python's hashlib. *l* corresponds to the maximum length of the returned hash. Internally, the
      string representation of *inp* is used.