code: def lstm(*args, **kwargs):
      if "batch_sizes" in kwargs or (
          len(args) >= 4 and not isinstance(args[3], bool)
      ):
          return _lstm_packed(*args, **kwargs)
      else:
          return _lstm_full(*args, **kwargs)
  
file_path: ivy/ivy/functional/frontends/torch/nn/functional/layer_functions.py
imports: import ivy
  from ivy.func_wrapper import with_supported_device_and_dtypes, with_supported_dtypes
  from ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back
label_desc: Use image node_id 4 for calling a global function with example usage: lstm() and returns: _lstm_packed, _lstm_full