<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fromDictionary(value):
 """creates the portal properties object from a dictionary"""

        if isinstance(value, dict):
            pp = PortalParameters()
            for k,v in value.items():
                setattr(pp, "_%s" % k, v)
            return pp
        else:
            raise AttributeError("Invalid input.")