<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_present_elements(self, locator, params=None, timeout=None, visible=False, parent=None):
 """ Get elements present in the DOM. If timeout is 0 (zero) return WebElement instance or None, else we wait and retry for timeout and raise TimeoutException should the element not be found. :param locator: element identifier :param params: (optional) locator parameters :param timeout: (optional) time to wait for element (default: self._explicit_wait) :param visible: (optional) if the element should also be visible (default: False) :param parent: internal (see #get_present_children) :return: WebElement instance """

        error_msg = "Children were never present" if parent else "Elements were never present!"
        expected_condition = ec.visibility_of_all_elements_located if visible else ec.presence_of_all_elements_located
        return self._get(locator, expected_condition, params, timeout, error_msg, parent)