code: def __init__(
      self,
      name: Optional[str] = None,
      logical_type: Optional[Type[LogicalType]] = None,
      tags: Optional[Set[str]] = None,
      primitive: Optional[PrimitiveBase] = None,
      base_features: Optional[List[LiteFeature]] = None,
      df_id: Optional[str] = None,
      related_features: Optional[Set[LiteFeature]] = None,
      idx: Optional[int] = None,
  ):
      self._logical_type = logical_type
      self._tags = tags if tags else set()
      self._primitive = primitive
      self._base_features = base_features if base_features else []
      self._df_id = df_id
      self._idx = idx if idx is not None else 0
      self._related_features = (
          related_features if related_features else set()
      )
  
      if self._primitive:
          if not isinstance(self._primitive, PrimitiveBase):
              raise ValueError(
                  "primitive input must be of type PrimitiveBase"
              )
  
          if len(self.base_features) == 0:
              raise ValueError(
                  "there must be base features if given a primitive"
              )
  
          if self._primitive.commutative:
              self._base_features = sorted(self._base_features)
  
          self._n_output_features = (
              self._primitive.number_output_features
          )
          self._depth = max([x.depth for x in self.base_features]) + 1
  
          if name:
              self._alias = name
  
          self._name = self._primitive.generate_name(
              [x.name for x in self.base_features],
          )
  
          return_column_schema = get_primitive_return_type(
              self._primitive
          )
          self._logical_type = (
              type(return_column_schema.logical_type)
              if return_column_schema.logical_type
              else None
          )
  
          self._tags = return_column_schema.semantic_tags
  
      else:
          if name is None:
              raise TypeError("Name must be given if origin feature")
  
          if self._logical_type is None:
              raise TypeError(
                  "Logical Type must be given if origin feature"
              )
  
          self._name = name
  
      if self._logical_type is not None and "index" not in self._tags:
          self._tags = self._tags | self._logical_type.standard_tags
  
      self._id = self._generate_hash()
  
imports: from __future__ import annotations
  import hashlib
  from dataclasses import field
  from functools import total_ordering
  from typing import Any, Dict, List, Optional, Set, Type, Union
  from woodwork.column_schema import ColumnSchema
  from woodwork.logical_types import LogicalType
  from featuretools.feature_discovery.utils import get_primitive_return_type, hash_primitive
  from featuretools.primitives.base.primitive_base import PrimitiveBase
label_desc: Use image node_id 1 to create a new LiteFeature object  with example: obj = LiteFeature(name, logical_type, tags, primitive, base_features, df_id, related_features, idx)