(self, entity_id)
return neighbors
Retrieves a list of neighbors associated to a given entity.

        Args:
          entity_id (str): STIX ID of the entity to get associated inticators
                from. (typically an Intrusion Set or an Incident)

        Returns:
          A list of JSON objects describing a Yeti object.
Retrieves a list of neighbors associated to a given entity.
Retrieves a list of neighbors associated to a given entity .
def get_neighbors(self, entity_id):
        """Retrieves a list of neighbors associated to a given entity.

        Args:
          entity_id (str): STIX ID of the entity to get associated inticators
                from. (typically an Intrusion Set or an Incident)

        Returns:
          A list of JSON objects describing a Yeti object.
        """
        results = requests.post(
            self.yeti_api_root + '/entities/{0:s}/neighbors/'.format(entity_id),
            headers={'X-Yeti-API': self.yeti_api_key},
        )
        if results.status_code != 200:
            return []
        neighbors = []
        for neighbor in results.json().get('vertices', {}).values():
            neighbors.append(neighbor)

        return neighbors
def get_neighbors ( self , entity_id ) : results = requests . post ( self . yeti_api_root + '/entities/{0:s}/neighbors/' . format ( entity_id ) , headers = { 'X-Yeti-API' : self . yeti_api_key } , ) if results . status_code != 200 : return [ ] neighbors = [ ] for neighbor in results . json ( ) . get ( 'vertices' , { } ) . values ( ) : neighbors . append ( neighbor ) return neighbors