Returns the direction of the variable if it is a parameter. Possible values
        are ["": no intent, "(in)", "(out)", "(inout)"].

def direction(self):
        """Returns the direction of the variable if it is a parameter. Possible values
        are ["": no intent, "(in)", "(out)", "(inout)"].
        """
        if self._direction is None:
            if hasattr(self, "parameters"):
                #This is actually a function that inherited from ValueElement, it is always
                #intent(out) for our purposes.
                self._direction = "(out)"
            else:
                intent = [m for m in self.modifiers if "intent" in m]
                if len(intent) > 0:
                    self._direction = intent[0].replace("intent", "").strip()
                else:
                    self._direction = ""

        return self._direction