code: def _get_step_attr(self, attr):
      n_nodes = len(self._nodes)
      if n_nodes == 0:
          raise AttributeError(
              "{} has not been connected yet.".format(self.name)
          )
      elif n_nodes == 1:
          return getattr(self._nodes[0], attr)
      else:
          raise AttributeError(
              "{} has been connected {} times (it is a shared step). "
              "Use `get_{}_at(port)` instead.".format(
                  self.name, n_nodes, attr
              )
          )
  
imports: import inspect
  import warnings
  from typing import Any, Callable, Dict, List, Optional, Union, TYPE_CHECKING
  from baikal._core.data_placeholder import DataPlaceholder, is_data_placeholder_list
  from baikal._core.utils import listify, make_name, make_repr
label_desc: Use image node_id 6 for calling the _StepBase obj's underlying member method code with example usage: obj._get_step_attr(attr) and returns: getattr