code: def test_direct_from_identity(es):
      device = Feature(es["sessions"].ww["device_type"])
      d = DirectFeature(base_feature=device, child_dataframe_name="log")
  
      feature_set = FeatureSet([d])
      calculator = FeatureSetCalculator(
          es, feature_set=feature_set, time_last=None
      )
      df = calculator.run(np.array([0, 5]))
      df = to_pandas(df, index="id", sort_index=True)
      v = df[d.get_name()].tolist()
      if es.dataframe_type == Library.SPARK:
          expected = ["0", "1"]
      else:
          expected = [0, 1]
      assert v == expected
  
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 1 for calling a global function with example usage: test_direct_from_identity(es) without return types