def sf_create_compose_application(client, compose_file, application_id,
    registry_user=None, registry_pass=None, encrypted=False, timeout=60):
    """
    Creates a Service Fabric application from a Compose file

    :param str application_id:  The id of application to create from
    Compose file. This is typically the full id of the application
    including "fabric:" URI scheme

    :param str compose_file: Path to the Compose file to use

    :param str registry_user: Username for target container registry

    :param bool encrypted: Indicates usage of encrypted password

    :param str registry_pass: Password for target container registry
    """
    from azure.cli.core.util import read_file_content
    from azure.cli.core.prompting import prompt
    from azure.cli.core.prompting import prompt_pass
    from azure.servicefabric.models.create_compose_application_description import CreateComposeApplicationDescription
    from azure.servicefabric.models.repository_credential import RepositoryCredential
    if not registry_user and registry_pass:
        registry_user = prompt('Registry username: ',
            'Username for target container registry')
    if not registry_pass and registry_user:
        registry_pass = prompt_pass('Registry password: ', False,
            'Password for target container registry')
    registry_cred = RepositoryCredential(registry_user, registry_pass,
        encrypted) if registry_user and registry_pass else None
    file_contents = read_file_content(compose_file)
    model = CreateComposeApplicationDescription(application_id,
        file_contents, registry_cred)
    client.create_compose_application(model, timeout)
