<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_blueprints(app, application_package_name=None, blueprint_directory=None):
 """Register Flask blueprints on app object"""

    if not application_package_name:
        application_package_name = 'app'

    if not blueprint_directory:
        blueprint_directory = os.path.join(os.getcwd(), application_package_name)

    blueprint_directories = get_child_directories(blueprint_directory)

    for directory in blueprint_directories:
        abs_package = '{}.{}'.format(application_package_name, directory)

        service = importlib.import_module(abs_package)
        app.register_blueprint(service.blueprint_api, url_prefix='')