def METHOD_NAME(db_dir, filepath, mountpoint, subdirectory, obj_id):
    if subdirectory:
        return join(db_dir, mountpoint, str(obj_id), filepath)
    else:
        return join(db_dir, mountpoint, filepath)