<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def search(self, q=None, per_page=None, page=None, bbox=None, sort_by="relavance", sort_order="asc"):
 """ searches the opendata site and returns the dataset results """

        url = self._url + "/datasets.json"
        param_dict = {
            "sort_by" : sort_by,
            "f" : "json"
        }
        if q is not None:
            param_dict['q'] = q
        if per_page is not None:
            param_dict['per_page'] = per_page
        if page is not None:
            param_dict['page'] = page
        if bbox is not None:
            param_dict['bbox'] = bbox
        if sort_by is not None:
            param_dict['sort_by'] = sort_by
        if sort_order is not None:
            param_dict['sort_order'] = sort_order
        ds_data =  self._get(url=url,
                    param_dict=param_dict,
                    securityHandler=self._securityHandler,
                    additional_headers=[],
                    proxy_url=self._proxy_url,
                    proxy_port=self._proxy_port)
        return ds_data