human
...and a function that adds Links to the Ecosystem:"
Please write code following the instructions in jupyter notebook style.
 ... Can you provide a code to?
assistant
#Here is code to .

  def linkUp(self, endpoint1, endpoint2, distance="1.0"):
    """ Creates a link between two endpoint locations
    """
    endpoint1_index = 0
    endpoint2_index = 0
    for i in range(0, len(self.locationNames)):
      if(self.locationNames[i] == endpoint1):
        endpoint1_index = i
      if(self.locationNames[i] == endpoint2):
        endpoint2_index = i

    self.locations[endpoint1_index].links.append( Link(self.locations[endpoint2_index], distance) )
    self.locations[endpoint2_index].links.append( Link(self.locations[endpoint1_index], distance) )

# Simple workarounds to make this Python member functions work properly in Jupyter 
# (which doesn't carry over the class structure from the previous fragment).    
Ecosystem.linkUp = linkUp