import hashlib


def hash_object(*objects, hasher=None):
    """Hash the given object(s) and return the hashlib hasher instance
    
    If no hasher argument is provided, then automatically created
    a hashlib.md5()
    """
    if hasher is None:
        hasher = hashlib.md5()
    
    for obj in objects:
        if isinstance(obj, dict):
            for key, value in obj.items():
                hash_object(key, hasher=hasher)
                hash_object(value, hasher=hasher)
            continue
        elif isinstance(obj, (list,tuple)):
            for e in obj:
                hash_object(e, hasher=hasher)
            continue
        elif isinstance(obj, bytes):
            hasher.update(obj)
            continue
        elif isinstance(obj, str):
            hasher.update(obj.encode('utf-8'))
            continue
        else:
            hasher.update(f'{obj}'.encode('utf-8'))

    return hasher