code: def logical_intf_helper(interface):
      
      if interface is None:
          return LogicalInterface.get_or_create(name='default_eth').href
      elif isinstance(interface, LogicalInterface):
          return interface.href
      elif interface.startswith('http'):
          return interface
      return LogicalInterface.get_or_create(name=interface).href
docs: Logical Interface finder by name. Create if it doesn't exist.
      This is useful when adding logical interfaces to for inline
      or capture interfaces.
  
      :param interface: logical interface name
      :return str href: href of logical interface