<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_modal_link(self, url, obj={}):
 """ Returns the metadata for a link that needs to be confirmed, if it exists, it also parses the message and title of the url to include row field data if needed. """

        if not (url in self.modal_links.keys()):
            return None

        try:
            if type(obj) != dict:
                obj.obj = str(obj)
                obj = vars(obj)
            link = self.modal_links[url]
            if link["type"] == "confirm":
                link["message"] = link["message"].format(**obj)
                link["title"] = link["title"].format(**obj)
                link["ok"]  # triggers a KeyError exception if not existent
                link["cancel"]
            elif link["type"] == "iframe":
                try:
                    link["size"]
                except KeyError:
                    link["size"] = "medium"
            else:
                raise ImproperlyConfigured(
                    "modal_links type: " + link["type"] + " is unsupported"
                )
            return link
        except KeyError as e:
            raise ImproperlyConfigured(
                "modal_links misses the following attribute: " + str(e)
            )
        except AttributeError:
            return None