code: def test_direct_with_invalid_init_args(diamond_es):
      customer_to_region = diamond_es.get_forward_relationships(
          "customers"
      )[0]
      error_text = (
          "child_dataframe must be the relationship child dataframe"
      )
      with pytest.raises(AssertionError, match=error_text):
          DirectFeature(
              IdentityFeature(diamond_es["regions"].ww["name"]),
              "stores",
              relationship=customer_to_region,
          )
  
      transaction_relationships = diamond_es.get_forward_relationships(
          "transactions"
      )
      transaction_to_store = next(
          r
          for r in transaction_relationships
          if r.parent_dataframe.ww.name == "stores"
      )
      error_text = "Base feature must be defined on the relationship parent dataframe"
      with pytest.raises(AssertionError, match=error_text):
          DirectFeature(
              IdentityFeature(diamond_es["regions"].ww["name"]),
              "transactions",
              relationship=transaction_to_store,
          )
  
imports: import numpy
  import pandas
  import pytest
  from woodwork.column_schema import ColumnSchema
  from woodwork.logical_types import Datetime
  from featuretools.computational_backends.feature_set import FeatureSet
  from featuretools.computational_backends.feature_set_calculator import FeatureSetCalculator
  from featuretools.feature_base import DirectFeature, Feature, IdentityFeature
  from featuretools.primitives import AggregationPrimitive, Day, Hour, Minute, Month, NMostCommon, Second, TransformPrimitive, Year
  from featuretools.primitives.utils import PrimitivesDeserializer
  from featuretools.synthesis import dfs
  from featuretools.tests.testing_utils import to_pandas
  from featuretools.utils.gen_utils import Library
label_desc: Use image node_id 8 for calling a global function with example usage: test_direct_with_invalid_init_args(diamond_es) without return types