def _get_type(self, policy):
<EOL>if isinstance(policy, string_types) or is_instrinsic(policy):<EOL><INDENT>return PolicyTypes.MANAGED_POLICY<EOL><DEDENT>if isinstance(policy, dict) and "<STR_LIT>" in policy:<EOL><INDENT>return PolicyTypes.POLICY_STATEMENT<EOL><DEDENT>if self._is_policy_template(policy):<EOL><INDENT>return PolicyTypes.POLICY_TEMPLATE<EOL><DEDENT>return PolicyTypes.UNKNOWN<EOL>
Returns the type of the given policy

:param string or dict policy: Policy data
:return PolicyTypes: Type of the given policy. None, if type could not be inferred