code: def test_invalid_init_args(diamond_es):
      error_text = (
          "parent_dataframe must match first relationship in path"
      )
      with pytest.raises(AssertionError, match=error_text):
          path = backward_path(diamond_es, ["stores", "transactions"])
          AggregationFeature(
              IdentityFeature(diamond_es["transactions"].ww["amount"]),
              "customers",
              Mean,
              relationship_path=path,
          )
  
      error_text = "Base feature must be defined on the dataframe at the end of relationship_path"
      with pytest.raises(AssertionError, match=error_text):
          path = backward_path(diamond_es, ["regions", "stores"])
          AggregationFeature(
              IdentityFeature(diamond_es["transactions"].ww["amount"]),
              "regions",
              Mean,
              relationship_path=path,
          )
  
      error_text = "All relationships in path must be backward"
      with pytest.raises(AssertionError, match=error_text):
          backward = backward_path(
              diamond_es, ["customers", "transactions"]
          )
          forward = RelationshipPath([(True, r) for _, r in backward])
          path = RelationshipPath(list(forward) + list(backward))
          AggregationFeature(
              IdentityFeature(diamond_es["transactions"].ww["amount"]),
              "transactions",
              Mean,
              relationship_path=path,
          )
  
imports: from datetime import datetime
  from inspect import isclass
  from math import isnan
  import numpy
  import pandas
  import pytest
  from woodwork.column_schema import ColumnSchema
  from woodwork.logical_types import Datetime
  from featuretools import AggregationFeature, Feature, IdentityFeature, Timedelta, calculate_feature_matrix, dfs, primitives
  from featuretools.entityset.relationship import RelationshipPath
  from featuretools.feature_base.cache import feature_cache
  from featuretools.primitives import Count, Max, Mean, Median, NMostCommon, NumTrue, NumUnique, Sum, TimeSinceFirst, TimeSinceLast, get_aggregation_primitives
  from featuretools.primitives.base import AggregationPrimitive
  from featuretools.synthesis.deep_feature_synthesis import DeepFeatureSynthesis, match
  from featuretools.tests.testing_utils import backward_path, feature_with_name, 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_invalid_init_args(diamond_es) without return types