def _is_item_allowed(resource, item, resourcesalloweddict, resourcesuseddict):
  """
   <Purpose>
      Check if the process can acquire a non-fungible, non-renewable resource.

   <Arguments>
      resource:
         A string with the resource name.   
      item:
         A unique identifier that specifies the resource.   It has some
         meaning to the caller (like a port number for TCP or UDP), but is 
         opaque to the nanny.   
         
   <Exceptions>
      None.

   <Side Effects>
      None.

   <Returns>
      True or False
  """

  if item in resourcesalloweddict[resource]:
    # this is semi nonsensical, but allows us to indicate which ports are used
    # through get_resource_information()
    resourcesuseddict[resource].add(item)
    return True

  else:
    return False