def METHOD_NAME():
    partitions_def = DynamicPartitionsDefinition(name="fruits")
    @asset(partitions_def=partitions_def)
    def dynamic1(context):
        assert context.asset_partition_key_for_output() == "apple"
        return 1
    @asset(partitions_def=partitions_def)
    def dynamic2(context, dynamic1):
        assert context.asset_partition_keys_for_input("dynamic1") == ["apple"]
        assert context.asset_partition_key_for_output() == "apple"
        return 1
    @asset
    def unpartitioned(context, dynamic1):
        assert context.asset_partition_keys_for_input("dynamic1") == ["apple"]
        return 1
    with instance_for_test() as instance:
        instance.add_dynamic_partitions(partitions_def.name, ["apple"])
        materialize([dynamic1, dynamic2, unpartitioned], instance=instance, partition_key="apple")