def get_namespaces_for_sed_object(obj):
    """ Get the namespace prefixes and URIs defined for a SED object

    Args:
        obj (:obj:`libsedml.SedBase`): SED object

    Returns:
        :obj:`dict`: dictionary that maps the prefixes of namespaces to their URIs
    """
    namespaces_obj = obj.getNamespaces()
    namespaces_dict = {}
    for i_namespace in range(namespaces_obj.getNumNamespaces()):
        prefix = namespaces_obj.getPrefix(i_namespace) or None
        uri = namespaces_obj.getURI(i_namespace)
        namespaces_dict[prefix] = uri
    return namespaces_dict