Why Sleep in Anvil?

What I’m trying to do:
I pulled some code from a clone and it had this line in it:

def delete_button_click(self, **event_args):
    """This method is called when the button is clicked"""
    data = self.tabulator_obj.get_selected_data()
    if not data:
      return

    self.delete_button.enabled = False

    anvil.js.call("loadSpinner", True)
    from time import sleep

    sleep(0.15)
    indices = [row["id"] for row in data]
    self.tabulator_obj.delete_row(indices)
    anvil.js.call("loadSpinner", False)
    return

Question
Someone with more experience, what is the point of this sleep timer? It doesn’t appear to be a thread object… is timing a concern here?

time.sleep will sometimes be used to give control back to the Javascript event loop so that UI changes can be reflected on the screen. It looks like that’s probably the case here, since the spinner is made visible and then invisible in the same function.