import hashlib


def hex_hash(path):
  """
  Return the first 2 hex digits of the md5 of the given path.
  Suitable for creating sub dirs to break up a large directory
  """

  return hashlib.md5(path).hexdigest()[:2]