def IsBlockInNameSpace(nesting_state, is_forward_declaration):
if is_forward_declaration:<EOL><INDENT>return len(nesting_state.stack) >= <NUM_LIT:1> and (<EOL>isinstance(nesting_state.stack[-<NUM_LIT:1>], _NamespaceInfo))<EOL><DEDENT>return (len(nesting_state.stack) > <NUM_LIT:1> and<EOL>nesting_state.stack[-<NUM_LIT:1>].check_namespace_indentation and<EOL>isinstance(nesting_state.stack[-<NUM_LIT:2>], _NamespaceInfo))<EOL>
Checks that the new block is directly in a namespace.

    Args:
      nesting_state: The _NestingState object that contains info about our state.
      is_forward_declaration: If the class is a forward declared class.
    Returns:
      Whether or not the new block is directly in a namespace.