def METHOD_NAME(output, add_child_tenancies):
    """Generate a c7n-org OCI tenancies configuration file using OCI configuration file and
    OCI Organizations API
    With c7n-org you can then run policies or arbitrary scripts across
    tenancies.
    """
    tenancies = []
    tenancy_set = set()
    parser = get_config_parser()
    sections = get_config_sections(parser)
    # Add the tenancies from OCI configurtion file
    add_config_tenancies(parser, sections, tenancies, tenancy_set)
    if add_child_tenancies:
        # Add the child tenancies using OCI Organizations API
        add_organization_child_tenancies(tenancies, tenancy_set, parser, sections)
    print(yaml_dump({"tenancies": tenancies}), file=output)